#Charging Station Automation

1 messages ยท Page 1 of 1 (latest)

tall olive
#

@obsidian hedge let's talk here to not spam the channel

obsidian hedge
#

thanks

tall olive
#

Would be better for you to get used to do this from the GUI so you don't have these indentation issues

obsidian hedge
#

error loading /config/configuration.yaml: while scanning for the next token

#

ok...

tall olive
#

For now just delete that action, then go to Settings -> Automations

#

You should see a list of your automations there

obsidian hedge
#

ok... let me check

tall olive
#

I'll guide you through it all don't worry โค๏ธ

#

It can seem a bit complex at first, but it's easy once you get the hang of it

obsidian hedge
#

mindblown thank you

#

remove all the automations? or just that trigger part?

#

The value template

tall olive
#

Just that trigger you're having trouble and errors with

#

Let me know once you get to the automations screen

#

Do you have a reason why turning it off is handled in a different automation @obsidian hedge ?

Do you have multiple charging stations, or multiple slots on the station? Or is that how you found it online and you tried implementing it for you?

obsidian hedge
#

just trying what is online ๐Ÿ˜„

tall olive
#

Alright, then we can get this done easier!

Create a new automation. In the "When" section:

  • Click Add Triger
  • Other Triggers
  • "Tag" and select your tag

In the "Then do " section choose "device", choose your switch, and set it to turn on

Now add another building block "Define Variables" and paste this in

variables:
    device_id: >
      {{ trigger.event.data.device_id }}
    sensor: >
      {{ device_entities(device_id) | select('search', 'battery_level') | first | default

Now add another building block "Wait for a trigger"

  • Click Other Triggers
  • Template Trigger
  • Add this in:
{{ states(sensor) | float >= 85 }}

Set a timeout such as 5hours and tick "Continue on timeout"

Then add another action for turning your station off

#

That should be it!

This will turn on the station once you scan the tag, then it will wait for your phone to get to 85% battery and turn the station off

tall olive
#

@obsidian hedge Did you manage to get it done?

obsidian hedge
#

no.. i had to restart the system for config update and now the sonoff stick is not initialising. trying to reconfigure the radio. sorry for taking time

tall olive
#

All good, petro suggested a slightly more efficient way which I like a lot more, updated the post with it

obsidian hedge
#

oh.. ok.. thank you..

#

I think it worked. Thank you so much for all your time and patience

#

Really appreciate it ๐Ÿ™

#

I will update you if it gets off on time .

#

It works.... Thank you sooooooo much. I really appreciate

tall olive
#

Happy to help! I had so much trouble when starting out and nobody helped me out so I know the struggle