seamus65
(Thomas Laurenson)
December 16, 2020, 5:11pm
1
Blueprint to control the charger for a permanently installed tablet control panel with a controllable switch device on the charger.
You can select the battery sensor, the charged percentage, the low charge percentage and the switch to control the charger.
Screen
Blueprint
Click the badge to import this Blueprint: (needs Home Assistant Core 2021.3 or higher)
Or import this Blueprint by using th forum topic URL:
blueprint:
name: Wallpanel Battery Management
description: 'Control the charger for a permanently mounted tablet control panel.'
domain: automation
input:
battery:
name: Battery
description: This is the battery sensor for the device.
selector:
entity:
domain: sensor
device_class: battery
charged_percent:
name: Charged Percent
description: 'The percentage charge the charger will turn off. (default: 80%)'
selector:
number:
min: 50
max: 100
unit_of_measurement: '%'
mode: slider
step: 1
default: 80
low_percent:
name: Low Percent
description: 'The percentage charge the charger will turn on. (default: 30%)'
selector:
number:
min: 0
max: 50
unit_of_measurement: '%'
mode: slider
step: 1
default: 30
charger:
name: Charger
description: The switch entity which turns the charger on and off.
selector:
entity:
domain: switch
source_url: https://gist.github.com/seamus65/ce7da8634366630537a62a55cfe321c8
mode: single
trigger:
- platform: homeassistant
event: start
- platform: event
event_type: automation_reloaded
- platform: numeric_state
entity_id: !input battery
above: !input charged_percent
- platform: numeric_state
entity_id: !input battery
below: !input low_percent
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: !input battery
above: !input charged_percent
sequence:
- service: switch.turn_off
data:
entity_id: !input charger
- conditions:
- condition: numeric_state
entity_id: !input battery
below: !input low_percent
sequence:
- service: switch.turn_on
data:
entity_id: !input charger
17 Likes
Roelofk85
(Roelof Kooijman)
December 16, 2020, 5:17pm
2
Thank you very mutch, going to use it!
1 Like
seamus65
(Thomas Laurenson)
December 16, 2020, 5:19pm
3
Let me know if there are any problems.
The automation works for me, but converting to blueprint might have done something.
123
(Taras)
December 16, 2020, 5:43pm
4
Why does the blueprint request inputs for charged_percent
and low_percent
but only uses them in the automation’s condition and not its trigger? In the trigger, the values are hard-coded to 80 and 30. Shouldn’t the triggers also be using the inputs?
seamus65
(Thomas Laurenson)
December 16, 2020, 5:45pm
6
That should be it fixed now.
Good spot, a leftover from testing and converting from my automation.
mike
December 18, 2020, 9:48pm
8
Has anyone successfully imported this?
If I use the github url I get:
mapping values are not allowed here in “”, line 16, column 77: … charger will turn off. (default: 80%) ^
If I use the community thread url I get:
No valid blueprint found in the topic. Blueprint syntax blocks need to be marked as YAML or no syntax.
digidude
(digi)
December 18, 2020, 10:31pm
9
i also get an error when trying to import this
seamus65
(Thomas Laurenson)
December 18, 2020, 11:14pm
10
I think I have fixed it.
Let me know if it works now.
Thanks! I had plans for creating exactly this automation.
Since my switches are Philips Hue light switches, I had to find/replace all ‘switch’ with ‘light’ in the Blueprint.
1 Like
seamus65
(Thomas Laurenson)
January 23, 2021, 6:23am
13
That’s good, glad it works for you.
malesci
(Malesci)
March 2, 2021, 3:44pm
14
thank you very useful, I’m using it for a smartphone that is always connected to the electricity grid. As a further improvement it would be very nice to be able to introduce a logic to prioritize charging during the night when electricity is cheaper. Do you have any plans to produce something like this?
thank you
1 Like
seamus65
(Thomas Laurenson)
March 3, 2021, 6:00am
15
Thank you.
I do not have any plans to modify this at the moment, but the blueprint files are reasonably easy to modify, you could make a copy and have a go at modifying and updating yourself and let me know how you get on.
xbmcnut
(xbmcnut)
October 14, 2021, 1:07am
17
Just what I needed, thank you! My attempt was an epic fail so I was pleased to stumble across yours which addresses my Home Assistant start-up issue.
1 Like
116port
(Carl )
December 13, 2021, 3:24pm
18
Hi, I am new to HA, have tried to use your blueprint, to control power charging to my wall tablet running HA but can’t seem to get it to works - What am I doing wrong - any help would be appreciated
id: ‘1639341639065’
alias: 'tablet test ’
description: ‘’
use_blueprint:
path: seamus65/wallpanel-battery-management.yaml
input:
battery: sensor.galaxy_tab_a7_battery_level
charger: switch.latched_hidden_switch_single_switch_1
seamus65
(Thomas Laurenson)
December 14, 2021, 8:47am
19
Hello,
Are you seeing the battery percentage in home assistant from sensor.galaxy_tab_a7_battery_level?
Can you manually control switch.latched_hidden_switch_single_switch_1 from home assistant and does it control the charge of the tablet?
116port
(Carl )
December 14, 2021, 11:22pm
20
Thanks for responding
Yes, and I can switch the unit on and off, just not via the automation
116port
(Carl )
December 14, 2021, 11:24pm
21
Also forgot to Mention that I’m using for fully kiosk on the tablet