Wall battery blueprint not working

Hi newbie!

I have downloaded this blueprint but it doesn’t work when it’s setup in automation

Code in yaml

id: hidden…
alias: New Automation
description: ‘’
use_blueprint:
path: apollo1220/phone_charger.yaml
input:
phone_battery: sensor.sm_t500_battery_level
phone_charger:
device_id: Hidden……
low_battery: 28
charged_battery: 92

Help !

I would say that blueprint is not optimal since it delays to wait for the battery to be charged.
A restart or saving another automation will break it.

This is probably a better solution

description: ""
mode: single
trigger:
  - platform: numeric_state
    entity_id: sensor.sm_t500_battery_level
    below: 28
    id: "on"
  - platform: numeric_state
    entity_id: sensor.sm_t500_battery_level
    id: "off"
    above: 92
condition: []
action:
  - service: homeassistant.turn_{{ trigger.id }}
    data: {}
    target:
      entity_id: switch.charger_entity

The only time this will not work is if you restart home assistant or the automations are reloaded just as the percentage crosses the thresholds, but that is a very smal risk of this.

thank you @Hellis81 I presume that I just change the entity_id to my shellly and it whould work??

or do I need to put something in her: service: homeassistant.turn_{{ trigger.id }}

No, just replace the charger_entity

image

so i updated it and the device is 19% but still not on

i.e not charging :frowning:

Did you change the automation before or after the battery went below 28%?

before it was approx 99%

Do you have a trace of the automation?


it appears it isnt in the automation list to lok at any trace??

Ok I believe you need to add a unique ID to the automation for it to appear in GUI.
Or just copy it from the file, then remove it and add it via GUI.