I am attempting to utilize the filter template. Other than tripping over the need to delineate filter sensors from template sensors (the example code in the filter// help file does not just drop in and work without understanding this delineation), I am now struggling with locating the new sensor.
So it now compiles and I see no glaring errors in the log regarding ‘filter’, but I do not find anywhere (Dev Tools / states), Entities, etc. any reference to the new sensor. I was led to believe that the filter sensor entity is referenced by its name.
I must be doing something wrong. Here are the config.yaml entries:
hot_tub_temp:
friendly_name: Hot Tub Temp
unit_of_measurement: '°F'
value_template: "{{ '%0.0f'|format(states('sensor.hot_tub_temp_int') | float / 10.0) }}"
device_class: temperature
hot_tub_temp_mem:
friendly_name: Hot Tub Temp Memory
unit_of_measurement: '°F'
value_template: >
{% if ( not (states('sensor.hot_tub_temp')|float > states('sensor.hot_tub_temp_mem')|float + 5 or states('sensor.hot_tub_temp')|float < states('sensor.hot_tub_temp_mem')|float - 5)), "true" %}
{{ states('sensor.hot_tub_temp')|float }}
{% else %}
{{ states('sensor.hot_tub_temp_mem')|float }}
{% endif %}
sensor:
- platform: filter
name: "Filtered Hot Tub Temp"
entity_id: sensor.hot_tub_temp
filters:
- filter: outlier
window_size: 5
radius: 5.0