Im trying to display temp values from two DS18B20 on a LCD display 20x4 but keep getting error while compiling my jaml code.
i get readings from the sensors and can display simple text like “Hello World” so i guess its a coding problem.
Heres my code so far:
dallas:
pin: GPIO3
sensor:
i2c:
sda: GPIO14
scl: GPIO12
scan: True
id: bus_a
display:
platform: lcd_pcf8574
dimensions: 20x4
address: 0x27
update_interval: 5s
lambda: |-
it.printf(0,0, “Panel 1: %.1f”, id(panel1).state);
it.printf(0,2, “Panel 2: %.1f”, id(panel2).state);
Sorry, didn´t write it down, ill get back to you to night when i can try again.
Karosm
(Karosm)
April 22, 2026, 9:57am
4
Try:
it.printf(0,0, “Panel 1: %.1f”, id(panel1).state);
Not all quotes are the same…
And always post your code using code tags ( </> button).
Hmm, honestly to me the two lines looks identic.
zoogara
(Daryl)
April 22, 2026, 12:02pm
6
That’s why we use code tags - </> on the posting toolbar. This prevents the text being reformatted by the forum editor. For example:
sensor:
- platform: dallas
address: 0xd53632d443bead28
name: "Panel 1"
id: panel1
- platform: dallas
address: 0xc87a76d443275f28
name: “Panel 2”
id: panel2
Panel 1 quotes I fixed - they are now as you would have typed them from your keyboard. Panel 2 is left as the editor changed it, pretty formatted quotes, actually 2 completely different characters from what you typed.
So repost both your yaml and the error log in code tags so we can see what they really look like.
ah now i see it, and now i see that “button” “preformatted text” ill use it next time, thanks for telling me.
ill have a look at my " tonight when im back home again.
Problem solved, it was the quotes
Thanks a lot for the help.
Karosm
(Karosm)
April 22, 2026, 7:35pm
10
No problem, remember code tags next time…