I’m very new to HA and learning as I go along.
I want an automation to charge my tablet when the battery level reaches 40% and stop when it gets to 80% using a wall plug.
I wrote this but can’t get it to execute.
I can’t see what I’ve done wrong.
Pretty sure it’s right in from of me but don’t see it.
I’m trying to use trigger ID’s as they’re new to me in automations.
Suggestions / corrections?
alias: Fire Tablet Battery Charging
description: “”
trigger:
You will need to rename switch.<your switch's name> for both sequences. You can find out your device’s name in Settings > Devices and Services > Entities.
I removed the device_id and changed the entity_id to the friendly name and get this error trying to save the changes: Message malformed: Unable to determine action @ data[‘action’][0][‘choose’][0][‘sequence’][0]
Under the original code, the visual editor shows the correct plug. Just as an FYI
I should note that the battery level sensor is coming from fully kiosk browser.
The entity_id and friendly_name are not the same thing although they will appear similar. Having written that, your format looks good (entity_id’s will use underscores _ instead of spaces.
Are you using the UI? …I ask as, if you are using yaml, switch.turn_off and switch.turn_on are so much easier to use as you done’t need those long device_ids.