cancel
Showing results for 
Search instead for 
Did you mean: 

Help with thermostat / smart plug automation script

gruiz18
Community Member

I'm trying to setup an automation to turn a smart plug on / off (connected to small space heater) depending on temperature as read by thermostat. It will turn "on" when the temp registers below 65 as intended but last night I noticed that the temp had hit 66 and plug still wasn't turning off. I watched for about 10 minutes and nothing happened. I tried to run the script manually at that point and it still didn't turn off. Can anyone offer insight on why it isn't working?

 

metadata:
  name: Heater Automation
  description:
    Turn on the heater when the temperature goes below 65F and turn it off
    when the temperature goes above 64F.
automations:
  - starters:
      - type: device.state.TemperatureSetting
        device: Hallway-New - Hallway
        state: thermostatTemperatureAmbient
        lessThan: 65F
    actions:
      - type: device.command.OnOff
        devices:
          - Reid’s Heater - Reid’s Room
        on: true
  - starters:
      - type: device.state.TemperatureSetting
        device: Hallway-New - Hallway
        state: thermostatTemperatureAmbient
        greaterThan: 64F
    actions:
      - type: device.command.OnOff
        devices:
          - Reid’s Heater - Reid’s Room
        on: false

 

0 REPLIES 0