Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 107890

Template changes from False to True but automation won't trigger

$
0
0

Hi,

I’m just starting out with home assistant and slowly building my automations. I’ve created a template to tell me when my car is charged. It looks at the state of charge and the target state of charge and sends a notification using the telegram integration when charging is complete.

I can see that the template changes from False to True when it reaches the required charge but my automation will not trigger. When I manually run the automation I get the notification fine.

Can anyone point me in the right direction as to what i’m doing wrong here?

Here’s the automation code below

alias: ID.3 Notification when charging complete
description: “”
trigger:

- platform: template
value_template: sensor.id3_charging_complete
condition:
action:
- service: notify.brendan
data:
message: >-
Your ID.3 is done charging, the current range is now
{{states(‘sensor.my_volkswagen_range’)}} km and the battery level is
{{states(‘sensor.my_volkswagen_state_of_charge’)}}%
mode: single

And here’s the code for the template i created

“{{ states.sensor.my_volkswagen_state_of_charge.state >= states.sensor.my_volkswagen_target_state_of_charge.state }}”

Many thanks in advance

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 107890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>