Need help to display value from DS18B20 temp sensor on LCD_PCF8574

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:

  • platform: dallas
    address: 0xd53632d443bead28
    name: “Panel 1”
    id: panel1

  • platform: dallas
    address: 0xc87a76d443275f28
    name: “Panel 2”
    id: panel2

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);

What error do you get?

Sorry, didn´t write it down, ill get back to you to night when i can try again.

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.

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.

except quote…

Problem solved, it was the quotes :slight_smile:
Thanks a lot for the help.

No problem, remember code tags next time…