Hi, Anybody know what could be causing my automation to turn on then immediately after turn off my switch?
I have an automation that turns on a van charger (working ok) and should turn off a blocking relay for a hot tub when the electricity tariff switches to off peak and vice versa for on peak.
Screenshot of the traces below as well as the automation config (note I actually setup automation via the GUI but easier to share code).
Thanks in advanvce.
id: '1735942837569'
alias: Octopus Low Tariff Action
description: Activate Hot Tub Blocking Relay when not on low Tarif rate
triggers:
- trigger: numeric_state
entity_id:
- sensor.octopus_energy_electricity_24e8051697_1411979871000_current_rate
above: 0.08
id: Peak Rate
- trigger: numeric_state
entity_id:
- sensor.octopus_energy_electricity_24e8051697_1411979871000_current_rate
below: 0.08
id: Off Peak
conditions: []
actions:
- if:
- condition: trigger
id:
- Off Peak
then:
- type: turn_off
device_id: 820302ec2f4c7b3b9c04e21d2db3dc69
entity_id: 4c19f717f3655b0cc50ac1e64b35601e
domain: switch
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.switch_16amcb_vancharger
else:
- if:
- condition: trigger
id:
- Peak Rate
then:
- type: turn_on
device_id: 820302ec2f4c7b3b9c04e21d2db3dc69
entity_id: 4c19f717f3655b0cc50ac1e64b35601e
domain: switch
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id:
- switch.switch_16amcb_vancharger
mode: single