blueprints/automation/device-status-energy.yaml aktualisiert
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user