Hi,
I want to check if a device is unavailable every day during a certain timeframe, and if it’s true would like to trigger HA to restart.
Note that I DON’T want to check if a state CHANGES within that timeframe. For my use case that change to “unknown” can also happen before. I basically just want to trigger the restart of HA only during that timeframe, not every time when there is a state change.
Will that do the trick?
trigger:
- platform: state
entity_id:
- switch.eve_energy_fdb7
to: unavailable
condition:
- condition: time
after: "23:30:00"
before: "23:45:00"
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- service: homeassistant.restart
data: {}
mode: single
I would want to do something similar. I want to check if the state of a device was off for the past 5 minutes, and if so, turn off a smart plug where this is connected.
This condition, i want to be check only between 00:01 AM and 08:00 AM
Reason is that i have a device that in OFF mode has 40w consumption. In this case, i want turned off id is not used