Hello all!
Can someone check my script? I added the config using the GUI and just cut and paste the YAML:
The switch comes on but does not turn off after hitting 70F
alias: Auto Space Heater
description: Turns plug on if temp below 68 and off if above 70
trigger:
- platform: numeric_state
entity_id: sensor.bedroom_temperature
attribute: temperature
above: '70.0'
- platform: numeric_state
entity_id: sensor.bedroom_temperature
below: '68'
condition: []
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.bedroom_temperature
attribute: temperature
above: '70.0'
sequence:
- type: turn_off
device_id: c7ba2df6df05aff532390d3248188352
entity_id: switch.spare_outlet
domain: switch
- conditions:
- condition: numeric_state
entity_id: sensor.bedroom_temperature
below: '68.0'
sequence:
- type: turn_on
device_id: c7ba2df6df05aff532390d3248188352
entity_id: switch.spare_outlet
domain: switch
default:
- type: turn_off
device_id: c7ba2df6df05aff532390d3248188352
entity_id: switch.spare_outlet
domain: switch
mode: restart