From c14af378a18c5e5f13c12e7cae44a1506bee2641 Mon Sep 17 00:00:00 2001 From: DK <16869713+poldim@users.noreply.github.com> Date: Thu, 21 Jan 2021 14:28:15 -0800 Subject: [PATCH 1/5] Add directions for handling text strings (#955) --- components/display/index.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/display/index.rst b/components/display/index.rst index 551b5a566..098a59fca 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 From 6b390d4b1d6cfbba6d0350f68ef34c2bf12d5ed8 Mon Sep 17 00:00:00 2001 From: Sascha Date: Sat, 23 Jan 2021 21:20:18 +0100 Subject: [PATCH 2/5] fix typo 5062 => 6052 (#956) --- guides/faq.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/faq.rst b/guides/faq.rst index 21c1801f0..c2fdf2a25 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: From 112fca66a1e1d6d6aa5ea54acf91deb7dec742c3 Mon Sep 17 00:00:00 2001 From: teffcz Date: Sun, 24 Jan 2021 10:20:03 +0100 Subject: [PATCH 3/5] Fix of typo in SPS30 page (#954) --- components/sensor/sps30.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/sensor/sps30.rst b/components/sensor/sps30.rst index 04b744d47..e78d3fa31 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 From 0e949047ae839fd281d28fb024f5b70f52f2510f Mon Sep 17 00:00:00 2001 From: tomlut <10679300+tomlut@users.noreply.github.com> Date: Sun, 24 Jan 2021 14:20:48 +0500 Subject: [PATCH 4/5] Remove reference to measuring humidity (#953) This device does not measure humidity. --- components/sensor/tmp117.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/sensor/tmp117.rst b/components/sensor/tmp117.rst index 9cf25d7de..c972077f1 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. From e4d01c804e8b5956833a4fe75e069f43632d5552 Mon Sep 17 00:00:00 2001 From: Dave Walker Date: Sun, 24 Jan 2021 01:21:58 -0800 Subject: [PATCH 5/5] Fix human-readable uptime example so it compiles (#949) --- components/sensor/uptime.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();