pille
(pille)
September 6, 2020, 7:42pm
1
i’d like to automate things triggered not only by the current state, but the historic state of a sensor.
use-cases are:
do something, when i was home for at least 2 hours today
turn off the burner at night, but not if the gas meter has increased within the last 30 minutes (don’t kill the pump)
water plants unless it rained today for at least 1 hour
how is this possible in a generic way? (the second example may be addressed by looking at the updated_at
atribute.)
Emphyrio
(Roelof)
September 6, 2020, 8:32pm
2
Check out ‘for x time’ in a condition.
pille
(pille)
September 6, 2020, 8:49pm
3
thanks @Emphyrio , but i think this only applies to the last state
update.
i’d like to sum up all intervals, where state
matches a condition within a (past) time interval.
nickrout
(Nick Rout)
September 6, 2020, 9:18pm
4
1 Like
pille
(pille)
September 6, 2020, 9:37pm
5
this looks promising. thanks, i would not have expected to find this feature implemented as a sensor
nickrout
(Nick Rout)
September 6, 2020, 9:39pm
6
The utility section of the integrations page has some real treasures https://www.home-assistant.io/integrations/#utility
pille
(pille)
September 6, 2020, 9:51pm
7
the stats
already have my attention, but the bayes
is really exiting…