I have two functional parts. One filter sensor that works. And one template sensor that also works.
But I can’t figure out a configuration that would work to have a filter compensated sensor
I tried adding a filter to the template, it doesn’t work. My new filter sensor from the compensated template sensor doesn’t work either.
I don’t know if I’m doing something wrong, or if I’ll have to go about it in a different way, like through some automation?
working Filter sensor
sensor:
- platform: filter
name: "filtered soil humidity Window"
entity_id: sensor.sonoff_1001841336_humidity
unique_id: sensor.sonoff_humidity_window
filters:
- filter: outlier
window_size: 16
radius: 16.0
- filter: lowpass
time_constant: 20
precision: 2
working template sensor
template:
- sensor:
- name: "Temperature Compensated Humidity Window"
unique_id: sensor.temp_comp_window
unit_of_measurement: "%"
state: >
{{ states('sensor.sonoff_1001841336_humidity') | float + (states('sensor.sonoff_10018421f8_temperature') | float - 16) * 1.1 }}
device_class: humidity
state_class: measurement