Hallo,
ich habe hier eine Automatisierung, die entweder, wenn die Leistungsaufnahme unter 10 W (beim Handy meiner Frau, die keine App installieren möchte), oder wenn die jeweiligen Geräte eingesteckt sind und der entsprechende Akku zu xx% geladen ist, abschalten soll.
Code: Alles auswählen
alias: HLG alle aus
description: ""
trigger:
- platform: device
type: turned_on
device_id: 55620eba3bab6ba61fa4cc80b4da9e05
entity_id: switch.handyladegerat
domain: switch
for:
hours: 0
minutes: 2
seconds: 0
condition:
- type: is_power
condition: device
device_id: 55620eba3bab6ba61fa4cc80b4da9e05
entity_id: sensor.hlg_energy_power
domain: sensor
below: 10
- condition: or
conditions:
- type: is_plugged_in
condition: device
device_id: bfb2da4635e8f8e2424a8f8e39c6c8d4
entity_id: binary_sensor.2201117ty_is_charging
domain: binary_sensor
for:
hours: 0
minutes: 2
seconds: 0
- condition: and
conditions:
- type: is_battery_level
condition: device
device_id: bfb2da4635e8f8e2424a8f8e39c6c8d4
entity_id: sensor.2201117ty_battery_level
domain: sensor
above: 93
- condition: or
conditions:
- type: is_battery_level
condition: device
device_id: 28f5cf3acaa1dc03849e7e16418fe2ba
entity_id: sensor.papahandy_battery_level
domain: sensor
above: 90
- condition: and
conditions: []
- type: is_plugged_in
condition: device
device_id: 28f5cf3acaa1dc03849e7e16418fe2ba
entity_id: binary_sensor.papahandy_is_charging
domain: binary_sensor
for:
hours: 0
minutes: 1
seconds: 0
- condition: or
conditions:
- type: is_battery_level
condition: device
device_id: 57cbb6efcdbabe1137117ae9fdd63d4c
entity_id: sensor.sm_t550_battery_level
domain: sensor
above: 90
- condition: and
conditions:
- type: is_plugged_in
condition: device
device_id: 57cbb6efcdbabe1137117ae9fdd63d4c
entity_id: binary_sensor.sm_t550_is_charging
domain: binary_sensor
action:
- type: turn_off
device_id: 55620eba3bab6ba61fa4cc80b4da9e05
entity_id: switch.handyladegerat
domain: switch
mode: single
Gruß, Andreas