From c84c8e12e73ca416807dda53281ec6a032e23dd1 Mon Sep 17 00:00:00 2001 From: thomas Date: Mon, 12 May 2025 14:43:28 +0000 Subject: [PATCH] blueprints/automation/device-status-energy.yaml aktualisiert --- .../automation/device-status-energy.yaml | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/blueprints/automation/device-status-energy.yaml b/blueprints/automation/device-status-energy.yaml index 5484b5d..7ceff75 100644 --- a/blueprints/automation/device-status-energy.yaml +++ b/blueprints/automation/device-status-energy.yaml @@ -1,6 +1,6 @@ blueprint: - name: Binary Sensor for Device Power Status - description: A template binary sensor that tracks device status based on energy consumption thresholds. + name: Device Status Based on Power Consumption + description: A blueprint to track device status using energy consumption with configurable thresholds and delays. domain: automation input: power_sensor: @@ -19,7 +19,7 @@ blueprint: max: 100 delay_on: name: Turn-On Delay (Minutes) - description: Waiting time before changing the binary sensor state to "on". + description: Waiting time before changing the status to "Device is running". default: 1 selector: number: @@ -28,18 +28,19 @@ blueprint: unit_of_measurement: minutes delay_off: name: Turn-Off Delay (Minutes) - description: Waiting time before changing the binary sensor state to "off". + description: Waiting time before changing the status to "Device is off". default: 3 selector: number: min: 0 max: 20 unit_of_measurement: minutes - binary_sensor_name: - name: Binary Sensor Entity ID - description: The name of the binary sensor entity to be created. + status_helper: + name: Device Status Helper + description: An input_boolean helper that tracks device status. selector: - text: + entity: + domain: input_boolean mode: restart trigger: @@ -49,9 +50,9 @@ trigger: for: minutes: !input delay_on action: - - service: homeassistant.update_entity + - service: input_boolean.turn_on target: - entity_id: !input binary_sensor_name + entity_id: !input status_helper - wait_for_trigger: - platform: numeric_state @@ -60,6 +61,6 @@ action: for: minutes: !input delay_off - - service: homeassistant.update_entity + - service: input_boolean.turn_off target: - entity_id: !input binary_sensor_name + entity_id: !input status_helper