HomeAssistant Sensors not available in EspHome

I’m building a display that should display the outside temperature which is available in Home Assistant from an ESPHome sensor. I’ve followed this guide:

In home assistant, the sensors is in the entity list called: sensor.outside_temperature

I have configured the display instance of ESPHome with:

sensor:
  - platform: homeassistant
    id: OutsideTemp
    entity_id: sensor.outside_temperature
    internal: true
    
display:
  - platform: lcd_pcf8574
    id: my_display
    dimensions: 20x4
    address: 0x27
    lambda: |-
      if (id(OutsideTemp).has_state()) {
        it.printf(0,2,"Outside: %.1f", id(OutsideTemp).state);
      }
      else {
         it.print(0,2,"No outside Temp");
      }

But it always displays: “No outside Temp” - I must be doing something very stuppid but I can’t figure it out. Any suggestions?

Not sure, but don’t think you can use Caps in IDs

1 Like