blueprints/automation/device-status-energy.yaml aktualisiert

This commit is contained in:
2025-05-12 14:39:09 +00:00
parent 5e4407c812
commit 77f2b5fafb

View File

@@ -1,6 +1,6 @@
blueprint: blueprint:
name: Device Status Based on Power Consumption name: Binary Sensor for Device Power Status
description: A blueprint to track device status using energy consumption with configurable thresholds and delays. description: A template binary sensor that tracks device status based on energy consumption thresholds.
domain: automation domain: automation
input: input:
power_sensor: power_sensor:
@@ -19,7 +19,7 @@ blueprint:
max: 100 max: 100
delay_on: delay_on:
name: Turn-On Delay (Minutes) name: Turn-On Delay (Minutes)
description: Waiting time before changing the status to "Device is running". description: Waiting time before changing the binary sensor state to "on".
default: 1 default: 1
selector: selector:
number: number:
@@ -28,19 +28,18 @@ blueprint:
unit_of_measurement: minutes unit_of_measurement: minutes
delay_off: delay_off:
name: Turn-Off Delay (Minutes) name: Turn-Off Delay (Minutes)
description: Waiting time before changing the status to "Device is off". description: Waiting time before changing the binary sensor state to "off".
default: 3 default: 3
selector: selector:
number: number:
min: 0 min: 0
max: 20 max: 20
unit_of_measurement: minutes unit_of_measurement: minutes
status_helper: binary_sensor_name:
name: Device Status Helper name: Binary Sensor Entity ID
description: An input_boolean helper that tracks device status. description: The name of the binary sensor entity to be created.
selector: selector:
entity: text:
domain: input_boolean
mode: restart mode: restart
trigger: trigger:
@@ -50,9 +49,9 @@ trigger:
for: for:
minutes: !input delay_on minutes: !input delay_on
action: action:
- service: input_boolean.turn_on - service: homeassistant.update_entity
target: target:
entity_id: !input status_helper entity_id: !input binary_sensor_name
- wait_for_trigger: - wait_for_trigger:
- platform: numeric_state - platform: numeric_state
@@ -61,6 +60,6 @@ action:
for: for:
minutes: !input delay_off minutes: !input delay_off
- service: input_boolean.turn_off - service: homeassistant.update_entity
target: target:
entity_id: !input status_helper entity_id: !input binary_sensor_name