#Help getting filter integration to work

7 messages · Page 1 of 1 (latest)

autumn delta
#

I have a purple air sensor which gets its data via REST, and then has those attributes split into individual sensors via templates, for example:

    unique_id: purpleair_temperature
    state: "{{ state_attr('sensor.purpleair', 'current_temp_f') }}"
    availability: "{{ is_number( state_attr('sensor.purpleair', 'current_temp_f') ) }}"
    unit_of_measurement: "°F"
    device_class: temperature
    icon: mdi:thermometer```

I want to smooth the data (which apparently arrives only in integer degrees) using the filter integration. However, the following appears to have no effect, as the signal still looks like steps between integer values of degrees. This is the filter config:

```sensor:
  - platform: filter
    name: "PurpleAir Temperature"
    entity_id: sensor.purpleair_temperature
    filters:
      - filter: lowpass
        window_size: 20```
I've also tried with time_constant: 300s, and that also seemed to have no effect. What am I doing wrong?
sleek jacinth
#

Call it "Purple Air Temperature Filtered" or something, it doesn't replace existing sensors, just adds a new, filtered one

#

You are likely getting an entity_id clash when it tries to create it

autumn delta
#

It also appears to remove the old one?

#

I renamed the source sensor purpleair_temperature_raw, and that one doesn't show up in my entity list. The old purpleair_temperature is now unavailable, and there is a new purpleair_temperature_2. I deleted the unavailable one and renamed the _2 to the original name (so I didn't have to touch any dashboards or automations) so I'll let it run for a while and see if the filter seems to be doing anything

autumn delta
#

this still isn't working. I've also tried renaming the filter sensor as "PurpleAir Temperature Filtered" as well as tried adding an explicit id: sensor.purpleair_temperature_filtered to it, but I don't see the filtered sensor entity in HA, and the filter is clearly not being applied to source sensor

sleek jacinth
#

Have you restarted ha or are you just reloading the configuration?