@sparkydave wrote:
If I use the following template in the dev panel, it works, but it doesn’t trigger my automation.
- alias: 'Salt lamp auto OFF with phones' trigger: - platform: time at: '21:00:00' - platform: template value_template: "{{ state_attr('sensor.daves_s7_battery_level', 'is_charging') }}" ### Dave's S7 on charge? condition: - condition: time after: '21:00:00' - condition: template value_template: "{{ state_attr('sensor.daves_s7_battery_level', 'is_charging') }}" ### Dave's S7 on charge? action: - service: light.turn_off entity_id: light.salt_lamp
Can someone please explain what I’m doing wrong?
I tried changing the template to:
value_template: "{{ is_state_attr('sensor.daves_s7_battery_level', 'is_charging') }}"
…based on the docs but that doesn’t work in the dev panel
Posts: 3
Participants: 3