diff --git a/components/display/index.rst b/components/display/index.rst index c8bec3c01..b6c650e57 100644 --- a/components/display/index.rst +++ b/components/display/index.rst @@ -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 diff --git a/components/sensor/sps30.rst b/components/sensor/sps30.rst index 785c4fd4e..011acc5a1 100644 --- a/components/sensor/sps30.rst +++ b/components/sensor/sps30.rst @@ -118,7 +118,7 @@ Wiring: ------- The sensor has a 5 pin JST ZHR type connector, with a 1.5mm pitch. (`Matching connector housing `__, `datasheet `__) -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 diff --git a/components/sensor/tmp117.rst b/components/sensor/tmp117.rst index 52adc9ee6..685626309 100644 --- a/components/sensor/tmp117.rst +++ b/components/sensor/tmp117.rst @@ -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 `__, `sparkfun `__) sensors with ESPHome. diff --git a/components/sensor/uptime.rst b/components/sensor/uptime.rst index afbc1e822..55577cca3 100644 --- a/components/sensor/uptime.rst +++ b/components/sensor/uptime.rst @@ -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(); diff --git a/guides/faq.rst b/guides/faq.rst index 3ef1cdfe7..89d356b2c 100644 --- a/guides/faq.rst +++ b/guides/faq.rst @@ -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: