I would like to create a template sensor that is only True if the state of all entities is False.
Unfortunately, the source sensors are sensor entities, not binary_sensor entities. This means, that I cannot use group for this. It will not report the state as expected.
I can never get jinja right… Would somebody please help me finish the sensor?
{% set my_entities = [
'sensor.00_currently_backing_up',
'sensor.01_currently_backing_up',
'sensor.02_currently_backing_up',
'sensor.03_currently_backing_up',
'sensor.04_currently_backing_up',
'sensor.05_currently_backing_up'
] %}
{% set my_state=False %}
# what goes here?
I need something like (pseudo-code) if every entity in entity == my_state, then return true; else return false.
So if all these currently_backing_up sensors’ state is False, then I’d like my template sensor to be True or On.
In any other case (eitherone/some of them is/are notFalse, or perhaps one/some of them is/are unknownor anything else butFalse, ) my template sensor needs to be False or Off as well).
Which means, I would like to my template to be 2024-05-05T10:30:00+00:00.
My current automation is triggered by input_datetime helpers, but I would rather use these sensor readings, then slap a timedelta on them (so that the device can WOL a couple minutes before the backups are actually scheduled) – so if I were to change the backup times (which happens on my synology NAS), the automation would adapt to them automatically.