You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem you have/What new integration you would like
I need a filter that ignores incoming values for a specified time after ESP bootup.
Please describe your use case for this integration and alternatives you've tried:
I want to add a gas sensor (MQ-135) which needs a specified time to heat up. With this filter, the heat up values wouldn’t passed forward to Home Assistant.
Additional context
The text was updated successfully, but these errors were encountered:
When using sliding_window_moving_average and send_first_at to guarantee a filtered value, the first odd reading (right after rebooting) introduces a distorted sample, which is annoying.
A parameter like n_skip: 1 or n_ignore: 1 would be awesome IMHO.
I've worked around a similar issue on one of my devices by doing something along these lines to skip the first couple of measurements during boot:
substitutions:
my_sensor: my_sensoresphome:
#...on_boot:
# work around https://github.com/esphome/feature-requests/issues/607# set a default value for the skip counter, otherwise it's nan
- sensor.template.publish:
id: ${my_sensor}_skipsstate: 0#...# register sensors for the datapointssensor:
- platform: my-platformname: ${my_sensor}filters:
# work around https://github.com/esphome/feature-requests/issues/607# increment a skip counter, this skips the first two measurements
- lambda: auto s = id(${my_sensor}_skips); if(s->state > 2) { return x; } else { s->publish_state(s->state+1); return {}; }# work around https://github.com/esphome/feature-requests/issues/607# create a skip counter
- platform: templateid: ${my_sensor}_skipsinternal: trueaccuracy_decimals: 0
It's not very pretty, and a simple skip-filter would be great for this use-case where a sensor's startup values may be off.
Describe the problem you have/What new integration you would like
I need a filter that ignores incoming values for a specified time after ESP bootup.
Please describe your use case for this integration and alternatives you've tried:
I want to add a gas sensor (MQ-135) which needs a specified time to heat up. With this filter, the heat up values wouldn’t passed forward to Home Assistant.
Additional context
The text was updated successfully, but these errors were encountered: