pellle87
(Pellle87)
November 3, 2019, 1:49am
1
So the thing i want to do is turn on switch.driveway_socket at different times based on the temperature outside
kinda like this
if temp outside between -1 to -10 turn on 06:00
if temp outside between -11 to -20 turn on 05:00
if temp outside between -21 to -30 turn on 04:00
if temp outside < -31 turn on 03:00
Times and temps are just examples but is this possible to achieve?
SteveDinn
(Steve Dinn)
November 3, 2019, 2:34am
2
You can totally do this with an automation that has a template trigger .
nickrout
(Nick Rout)
November 3, 2019, 3:55am
3
Answering this spring in 27C sunshine and thinking ‘poor bastard’.
When is the conditional temp being measured. It could be different at 3am and 5am - your problem is not particularly well defined.
You can however create a series of automations to look at the outside temp at 3, then 4 then 5 etc.
However what happens if it is -28 at 3am then goes down to -32 at 3.30.
Things to ponder.
Hmm good question… i need an automation to check the temp like every 15 min… dunno if thats possible tho
Hmm thanks, will look into it
Will something like this worked? i really cant figure this out in my head, haha!
- id: '1572773700846'
alias: 1 TEST
description: ''
trigger:
- hours: ''
minutes: /15
platform: time_pattern
seconds: ''
condition:
- condition: state
entity_id: switch.driveway_socket
state: 'off'
- condition: and
conditions:
- below: '-1'
condition: numeric_state
entity_id: sensor.weather_temperature
- condition: and
conditions:
- above: '-15'
condition: numeric_state
entity_id: sensor.weather_temperature
- after: 05:30:00
condition: time
- condition: or
conditions:
- below: '-16'
condition: numeric_state
entity_id: sensor.weather_temperature
- above: '-25'
condition: numeric_state
entity_id: sensor.weather_temperature
- after: 04:30:00
condition: time
action:
- data:
entity_id: switch.driveway_socket
service: switch.turn_on