mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-13 20:11:53 +01:00
Merge branch 'current' into beta
This commit is contained in:
commit
8ddb39e6b9
@ -277,7 +277,16 @@ arguments after the format string in the right order.
|
||||
// %% - literal % sign
|
||||
it.printf(0, 0, id(my_font), "Temperature: %.1f°C, Humidity: %.1f%%", id(temperature).state, id(humidity).state);
|
||||
|
||||
To display a text string from a ``text_sensor``, append ``.c_str()`` to the end of your variable.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
display:
|
||||
- platform: ...
|
||||
# ...
|
||||
lambda: |-
|
||||
it.printf(0, 0, id(my_font), "Text to follow: %s", id(template_text).state.c_str());
|
||||
|
||||
The last printf tip for use in displays I will discuss here is how to display binary sensor values. You
|
||||
*could* of course just check the state with an ``if`` statement as the first few lines in the example below, but if
|
||||
you want to be efficient you can use an *inline if* too. With the ``%s`` print specifier you can tell it to
|
||||
|
@ -118,7 +118,7 @@ Wiring:
|
||||
-------
|
||||
|
||||
The sensor has a 5 pin JST ZHR type connector, with a 1.5mm pitch. (`Matching connector housing <https://octopart.com/zhr-5-jst-279203>`__, `datasheet <http://www.farnell.com/datasheets/1393424.pdf>`__)
|
||||
To force the force the sensor into I²C mode, the SEL pin (Interface Select pin no.5) should be shorted to ground (pin no.4)
|
||||
To force the sensor into I²C mode, the SEL pin (Interface Select pin no.5) should be shorted to ground (pin no.4)
|
||||
|
||||
.. figure:: images/sps30-wiring.png
|
||||
:align: center
|
||||
|
@ -6,7 +6,7 @@ TMP117 Temperature Sensor
|
||||
:image: tmp117.jpg
|
||||
:keywords: TMP117
|
||||
|
||||
The TMP117 Temperature+Humidity sensor allows you to use your TMP117
|
||||
The TMP117 Temperature sensor allows you to use your TMP117
|
||||
(`datasheet <https://www.ti.com/lit/ds/symlink/tmp117.pdf>`__,
|
||||
`sparkfun <https://www.sparkfun.com/products/15805>`__)
|
||||
sensors with ESPHome.
|
||||
|
@ -58,7 +58,7 @@ with human readable output.
|
||||
return (
|
||||
(days ? String(days) + "d " : "") +
|
||||
(hours ? String(hours) + "h " : "") +
|
||||
(minutes ? String(minutes + "m " : "") +
|
||||
(minutes ? String(minutes) + "m " : "") +
|
||||
(String(seconds) + "s")
|
||||
).c_str();
|
||||
|
||||
|
@ -260,7 +260,7 @@ Command reference:
|
||||
# Warning: this command is currently not working with Docker on MacOS. (see note below)
|
||||
docker run --rm -v "${PWD}":/config --net=host -it esphome/esphome
|
||||
|
||||
# Start dashboard on port 5062 (MacOS specific command)
|
||||
# Start dashboard on port 6052 (MacOS specific command)
|
||||
docker run --rm -p 6052:6052 -e ESPHOME_DASHBOARD_USE_PING=true -v "${PWD}":/config -it esphome/esphome
|
||||
|
||||
# Setup a bash alias:
|
||||
|
Loading…
Reference in New Issue
Block a user