Hi,
I noticed a very strange and annoying bug in HA. I think it started once I’ve updated to 0.80 (I’m on a 0.81.2 currently), but I’m not sure. I got a rest sensor that downloads weather data from my local server.
- platform: rest
resource: 'http://redfish.pl/pogoda/?format=json'
name: Pogoda
json_attributes:
- dwor
- temperatura
- odczuwalna
- pokoj
- salon
- sypialnia
- pm25
- pm25_percent
- pm10
- pm10_percent
- powietrze
- powietrze_opis
- wilgotnosc
- cisnienie
- czas
value_template: '{{ value_json.dwor }}'
unit_of_measurement: '°C'
force_update: true
- platform: template
sensors:
rfw_outside:
friendly_name: 'Dwór'
unit_of_measurement: '°C'
value_template: '{{ state_attr("sensor.pogoda", "dwor") }}'
rfw_meteo:
friendly_name: 'Meteo'
unit_of_measurement: '°C'
value_template: '{{ state_attr("sensor.pogoda", "temperatura") }}'
rfw_feels_like:
friendly_name: 'Odczuwalna'
unit_of_measurement: '°C'
value_template: '{{ state_attr("sensor.pogoda", "odczuwalna") }}'
rfw_living_room:
friendly_name: 'Salon'
unit_of_measurement: '°C'
value_template: '{{ state_attr("sensor.pogoda", "salon") }}'
rfw_kids_room:
friendly_name: 'Chłopaki'
unit_of_measurement: '°C'
value_template: '{{ state_attr("sensor.pogoda", "pokoj") }}'
rfw_bedroom:
friendly_name: 'Sypialnia'
unit_of_measurement: '°C'
value_template: '{{ state_attr("sensor.pogoda", "sypialnia") }}'
rfw_caqi:
friendly_name: 'CAQI'
icon_template: mdi:factory
value_template: '{{ state_attr("sensor.pogoda", "powietrze") }}'
rfw_haqi:
friendly_name: 'HomeKit AQI'
unit_of_measurement: 'AQI'
icon_template: mdi:factory
value_template: '{{ state_attr("sensor.pogoda", "haqi") }}'
rfw_caqi_text:
friendly_name: 'Powietrze'
icon_template: mdi:factory
value_template: '{{ state_attr("sensor.pogoda", "powietrze_opis") }}'
rfw_pm10:
friendly_name: 'PM 10'
icon_template: mdi:factory
unit_of_measurement: 'μg/m3'
value_template: '{{ state_attr("sensor.pogoda", "pm10") }}'
rfw_pm10_percent:
friendly_name: 'PM 10 (% normy)'
icon_template: mdi:factory
unit_of_measurement: '%'
value_template: '{{ state_attr("sensor.pogoda", "pm10_percent") }}'
rfw_pm10_text:
friendly_name: 'PM 10'
icon_template: mdi:factory
value_template: '{{ state_attr("sensor.pogoda", "pm10") }} μg/m3 ({{ state_attr("sensor.pogoda", "pm10_percent") }}%)'
rfw_pm25:
friendly_name: 'PM 2.5'
icon_template: mdi:factory
unit_of_measurement: 'μg/m3'
value_template: '{{ state_attr("sensor.pogoda", "pm25") }}'
rfw_pm25_percent:
friendly_name: 'PM 2.5 (% normy)'
icon_template: mdi:factory
unit_of_measurement: '%'
value_template: '{{ state_attr("sensor.pogoda", "pm25_percent") }}'
rfw_pm25_text:
friendly_name: 'PM 2.5'
icon_template: mdi:factory
value_template: '{{ state_attr("sensor.pogoda", "pm25") }} μg/m3 ({{ state_attr("sensor.pogoda", "pm25_percent") }}%)'
rfw_pressure:
friendly_name: 'Ciśnienie'
unit_of_measurement: 'mb'
icon_template: mdi:gauge
value_template: '{{ state_attr("sensor.pogoda", "cisnienie") }}'
rfw_humidity:
friendly_name: 'Wilgotność'
unit_of_measurement: '%'
device_class: humidity
icon_template: mdi:water-percent
value_template: '{{ state_attr("sensor.pogoda", "wilgotnosc") }}'
When looking at the attributes in dev-state all seems ok:
But in the UI (both old and lovelace, also both in sensor state and history graph) the data is not updated (compare the PM 2.5, PM 10 and CAQI values):
It is best visible in PM 2.5:
As you can see, the HA states that the sensor has been updated 1 hour ago, but in the sensor details I can clearly see that the update took place few minutes ago. What’s even more interesting is that all the temperature values (dwor, temperatura and odczuwalna), but only those, get updated normally, every 5 minutes. The only way to update those in UI (and on graphs) is to restart HA.
It’s driving me mad, any ideas what could it be?
Translation that can help reading the screenshots:
- czas = time
- 1 godzina temu = 1 hour ago