I have a water level detector that during a transition time flips on and off more or less every second. I would like to get a more stable reading and found the filter platform and the throttle_time filter that I thought should solve my problem. However, it does not work as I expect. The output of this filter is “on” forever. I thought it should take the sample the first change in the time window and then ignore subsequent changes until the end of the time window, and then take a new sample and so on.
Sorry, it works as expected. I just had a too narrow time window when I checked the filter data in the History tab…
Edit: @tom_l, saw your remark about delayed_on and delayed_off. Is possible to filter the raw binary sensor with those option? Even if the filter works as expected, the rapid on/off changes of the raw sensor will fill up the database with a lot of noice. I can’t find any other info about delayed_on/delayed_off than GPIO related. In my case the raw sensor is MQTT based.
It won’t stop the states being sent but it will stop your binary sensor reacting. Post your mqtt config for the binary sensor, and what is more important a fast on or off time (the other will be delayed by the filter)?
This is not a critical thing for me since I have python script on the remote machine that controls waterfilling. I just thought it would be nice to get rid of that and have everything implemented in HA. But I don’t want to fill up HA database with garbage date. So if I can filter the raw data before actually storing anything in the database, it would be good.
Edit: There is an option to set the poll intervall in MQTT IO that publish the GPIO status on the HA MQTT broker. This seems to be good option to reduce data. There is no need to check waterlevel 10times/s…