Co je třeba:
Entita baterie kterou chcete nabíjet
Entita spínače nabíječky kterou chcete ovládat podle úrovně nabití baterie tabletu
Kód: Vybrat vše
blueprint:
name: Wallpanel Správa baterie
description: Ovládejte nabíječku trvale namontovaného ovládacího panelu tabletu
domain: automation
input:
battery:
name: Baterie
description: Vyberte senzor baterie pro zařízení
selector:
entity:
domain: sensor
device_class: battery
charged_percent:
name: Procenta nabití
description: Procento nabití při kterém nabíječka vypne
selector:
number:
min: 50
max: 100
unit_of_measurement: '%'
mode: slider
step: 1
default: 80
low_percent:
name: Minimální procenta
description: Procento nabití při kterém nabíječka zapne
selector:
number:
min: 0
max: 50
unit_of_measurement: '%'
mode: slider
step: 1
default: 30
charger:
name: Nabíječka
description: Vyberte spínač který ovládá nabíječku
selector:
entity:
domain: switch
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