I’m sure this must be the most common topic but here goes.
I’ve just created a automation to switch on/off a towel rail heater using a Shelly plus1 relay, this dependent on the percentage charge of my Tesla powerwall battery.
I have created two threshold sensors that are in an on or off state, one when the battery is above 99% and one when the battery is below 97%. I can see these are working correctly changing from on/off and visa versa. I have used these in two automations one to switch on the towel rail and one to switch it off.
I have checked the states that should cause the trigger are working, I’ve checked the action is working correctly manually but for some reason the automation will not trigger. This is the automation that should turn the towelrail on when the battery is above 99% (the threashold sensor will then go from off to on), can anyone see an issue?
id: '1650383854973'
alias: Towel Rail A - ON
description: ''
trigger:
- platform: state
entity_id: binary_sensor.powerwall_100
attribute: sensor_value
from: 'off'
to: 'on'
condition:
- condition: time
after: '09:00:00'
before: '17:00:00'
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- type: turn_on
device_id: 179101863ebb25a30f532f04b8b3b99a
entity_id: switch.shellyplus1pm_7c87ce65cfa0_switch_0
domain: switch
mode: single