@magic.dave wrote:
Hi everyone,
I’ve been trying to make an automation and after several trials I’ve come to the result that I need help to get this done.
What the automation should do: 10 minutes before my smartphone alarm starts and if the temperature in my bathroom is under 20°C the thermostate will be enabled.
My code so far:
- id: '1581871043818' alias: Bathroom Warmup description: '' trigger: - minutes: /1 platform: time_pattern seconds: '0' condition: - condition: template value_template: '{{ (((as_timestamp(now()) | int) + 10*60) | timestamp_custom("%Y-%m-%d %H:%M:00")) == states.sensor.next_alarm.state }}' - condition: template data_template: "{{ state_attr('climate.heizungsthermostat_climate', 'current_temperature') | float < 20 }}" action: - entity_id: script.1581870339430 service: script.turn_on
By the way: The part to start 10 minutes before the alarm goes off works already properly on other automations.
Thanks for your help in advance.
Posts: 2
Participants: 2