blueprints/automation/device-status-energy.yaml aktualisiert
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
blueprint:
|
blueprint:
|
||||||
name: Binary Sensor for Device Power Status
|
name: Device Status Based on Power Consumption
|
||||||
description: A template binary sensor that tracks device status based on energy consumption thresholds.
|
description: A blueprint to track device status using energy consumption with configurable thresholds and delays.
|
||||||
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 binary sensor state to "on".
|
description: Waiting time before changing the status to "Device is running".
|
||||||
default: 1
|
default: 1
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
@@ -28,18 +28,19 @@ 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 binary sensor state to "off".
|
description: Waiting time before changing the status to "Device is 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
|
||||||
binary_sensor_name:
|
status_helper:
|
||||||
name: Binary Sensor Entity ID
|
name: Device Status Helper
|
||||||
description: The name of the binary sensor entity to be created.
|
description: An input_boolean helper that tracks device status.
|
||||||
selector:
|
selector:
|
||||||
text:
|
entity:
|
||||||
|
domain: input_boolean
|
||||||
|
|
||||||
mode: restart
|
mode: restart
|
||||||
trigger:
|
trigger:
|
||||||
@@ -49,9 +50,9 @@ trigger:
|
|||||||
for:
|
for:
|
||||||
minutes: !input delay_on
|
minutes: !input delay_on
|
||||||
action:
|
action:
|
||||||
- service: homeassistant.update_entity
|
- service: input_boolean.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: !input binary_sensor_name
|
entity_id: !input status_helper
|
||||||
|
|
||||||
- wait_for_trigger:
|
- wait_for_trigger:
|
||||||
- platform: numeric_state
|
- platform: numeric_state
|
||||||
@@ -60,6 +61,6 @@ action:
|
|||||||
for:
|
for:
|
||||||
minutes: !input delay_off
|
minutes: !input delay_off
|
||||||
|
|
||||||
- service: homeassistant.update_entity
|
- service: input_boolean.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: !input binary_sensor_name
|
entity_id: !input status_helper
|
||||||
|
|||||||
Reference in New Issue
Block a user