All my variables print as nan

I’m trying to pull weather data and print to an eink display, but no matter what variable I point things to it prints as “nan”. What am I missing?

YAML Sensor Block

sensor:
  - platform: homeassistant
    entity_id: sensor.openweathermap_temperature
    id: current_temperature
  - platform: homeassistant
    entity_id: sensor.openweathermap_feels_like_temperature
    id: feels_like_temperature

text_sensor:
  - platform: homeassistant
    entity_id: weather.openweathermap
    id: weather_state
  - platform: homeassistant
    entity_id: sensor.openweathermap_condition
    id: weather_condition_now

Lambda:

      it.printf(300, 158, id(font_large_bold), COLOR_ON, TextAlign::TOP_CENTER, "%2.0f°F", id(current_temperature).state);
      
      it.printf(100, 500, id(font_medium_bold), COLOR_ON, TextAlign::TOP_CENTER, "%2.1f°F", id(feels_like_temperature).state);

Log shows:

[14:17:01][C][homeassistant.sensor:030]: Homeassistant Sensor 'current_temperature'
[14:17:01][C][homeassistant.sensor:030]:   State Class: ''
[14:17:01][C][homeassistant.sensor:030]:   Unit of Measurement: ''
[14:17:01][C][homeassistant.sensor:030]:   Accuracy Decimals: 1
[14:17:01][C][homeassistant.sensor:031]:   Entity ID: 'sensor.openweathermap_temperature'
[14:17:01][C][homeassistant.sensor:030]: Homeassistant Sensor 'feels_like_temperature'
[14:17:01][C][homeassistant.sensor:030]:   State Class: ''
[14:17:01][C][homeassistant.sensor:030]:   Unit of Measurement: ''
[14:17:01][C][homeassistant.sensor:030]:   Accuracy Decimals: 1
[14:17:01][C][homeassistant.sensor:031]:   Entity ID: 'sensor.openweathermap_feels_like_temperature'

What am I missing? Any help would be greatly appreciated!

Did you add the device as an integration to HA? Please post the complete Log and yaml

1 Like

OMG! What a brain fart. Thank you so much. That was it. I totally forgot to add it as an integration. Fixed and working!