Hi,
I have a automation that turns on the engine heater if the temperature goes below -5 celsius and if the time is 06:15 but not later than 08:00.
I also would like to state the days of the week when this automation should run. How do I do this?
- id: '12345678913354'
alias: Engine heater on minus 5 or lower
trigger:
- below: '-5'
entity_id: sensor.utomhustemperatur_temperature
platform: numeric_state
condition:
- after: 06:15
condition: time
- before: 08:00
condition: time
action:
- data:
entity_id: switch.motorvarmare
service: switch.turn_on
Ok, thanks for the reply!
Do you mean the “and” needs to be added or that it is added by the system by default?
However, as the script is right now it does not work.
The code below works without condition. The switch will turn on if it is -5 degrees or less.
But I also want it to start at 06:15 and not later than 08:00.
When I added the conditions the automation stopped working.
- id: '12345678913354'
alias: Engine heater on minus 5 or lower
trigger:
- below: '-5'
entity_id: sensor.utomhustemperatur_temperature
platform: numeric_state
condition:
- after: 06:15
condition: time
- before: 08:00
condition: time
action:
- data:
entity_id: switch.motorvarmare
service: switch.turn_on