Wondering if there’s a condition that will check if a state changed to “X” in the last “X” mins? Not a “for” condition as that will only trigger when “x” mins has passed.
What I’m basically trying to do is check if a users presence changed in the last 30mins…
As an example:
- alias: Telegram Bot - House is Empty (Mike)
initial_state: ‘on’
trigger:
platform: state
entity_id: group.household
to: ‘off’
condition:
condition: and
conditions:Check if a House Mode has already been set manually
- condition: state
entity_id: input_boolean.away_mode
state: ‘off’ - condition: state
entity_id: input_boolean.mike_home
state: ‘off’
In_last:
** Minutes: 10**
action: - service: notify.telegram
data:
message: “Mike Looks like no one is home. How long will you all be gone?”
data:
inline_keyboard:
- “Back Later Today:/away, Day or More:/holiday”
- “I’m at Home!:/home”
- condition: state