From 6ce6fa2f62f56fe7ece7cc3fd34212fb442d4d5e Mon Sep 17 00:00:00 2001 From: nwithan8 Date: Wed, 29 Mar 2023 10:51:43 -0600 Subject: [PATCH] - Option to set boolean values --- .../automations/based_on_sensor.yaml | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/home_assistant/blueprints/automations/based_on_sensor.yaml b/home_assistant/blueprints/automations/based_on_sensor.yaml index 4e6e7f5..694c587 100644 --- a/home_assistant/blueprints/automations/based_on_sensor.yaml +++ b/home_assistant/blueprints/automations/based_on_sensor.yaml @@ -10,13 +10,29 @@ blueprint: description: A sensor that toggles on and off selector: entity: - domain: sensor + domain: + - sensor + - binary_sensor + - input_boolean + - light + - switch + - outlet + sensor_on_state: + name: Sensor "on" + description: State the sensor is considered "on" + selector: + text: sensor_on_action: name: When enabled description: The action to perform when the sensor is enabled selector: action: default: [] + sensor_off_state: + name: Sensor "off" + description: State the sensor is considered "off" + selector: + text: sensor_off_action: name: When disabled description: The action to perform when the sensor is disabled @@ -33,12 +49,12 @@ trigger: entity_id: !input sensor for: !input duration platform: state - to: "False" + to: !input sensor_off_state - id: "on" entity_id: !input sensor platform: state - to: "True" + to: !input sensor_on_state condition: []