core: Filter platform not working after 0.97
Home Assistant release with the issue:
0.97
Last working Home Assistant release (if known): 0.96
Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io
Component/platform:
https://www.home-assistant.io/components/filter/
Description of problem: Filters are not working anymore.
and the raw sensor (unfiltered data) seems to be ok:

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
- platform: filter
name: "room_temperature"
entity_id: sensor.RAW_room_temperature
filters:
- filter: outlier
window_size: 4
radius: 2.0
- platform: filter
name: "hall_temperature"
entity_id: sensor.RAW_hall_temperature
filters:
- filter: outlier
window_size: 4
radius: 2.0
- platform: filter
name: "room_humidity"
entity_id: sensor.RAW_room_humidity
filters:
- filter: outlier
window_size: 4
radius: 4.0
Traceback (if applicable):
Log Details (ERROR)
Wed Aug 07 2019 22:59:32 GMT-0600 (CST)
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 400, in _async_add_entity
await entity.async_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/filter/sensor.py", line 244, in async_added_to_hass
history_list.extend([state for state in filter_history[self._entity]])
KeyError: 'sensor.raw_room_temperature'
Additional information:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 27 (10 by maintainers)
Well now I’m thoroughly confused. 2 days ago when I posted this, HomeAssistant had been up for several hours with the raw sensor showing a value, but the filter sensor showing unknown and the debug making no reference to it at all.
I was at work and couldn’t check back until now, but now everything is showing properly. with the filter sensor now showing a value as well.
So I really have no idea what happened, but all’s well that ends well?
That explanation doesn’t make sense. If it was due to not recording the raw values, why did it work in the last version?
I’m in the same boat, no changes on my end between versions, but it worked beforee and doesn’t now.
I’m closing this now 😉