initial commit
This commit is contained in:
119
indication.yaml
Normal file
119
indication.yaml
Normal file
@ -0,0 +1,119 @@
|
||||
blueprint:
|
||||
name: HS-WD200+ LED State Indicator
|
||||
description: Set a specific LED on a HomeSeer WD200+ dimmer based on entity state.
|
||||
domain: automation
|
||||
input:
|
||||
target_device:
|
||||
name: HS-WD200+ Device
|
||||
selector:
|
||||
device:
|
||||
integration: zwave_js
|
||||
|
||||
monitored_entity:
|
||||
name: Entity to Monitor
|
||||
selector:
|
||||
entity: {}
|
||||
|
||||
expected_state:
|
||||
name: State to Match
|
||||
description: Select a common state or enter a custom one below.
|
||||
selector:
|
||||
select:
|
||||
options:
|
||||
- "on"
|
||||
- "off"
|
||||
- "home"
|
||||
- "away"
|
||||
- "cool"
|
||||
- "heat"
|
||||
- "idle"
|
||||
- "open"
|
||||
- "closed"
|
||||
- "locked"
|
||||
- "unlocked"
|
||||
|
||||
custom_expected_state:
|
||||
name: Custom State (optional)
|
||||
description: Use this if the expected state is not in the list above.
|
||||
default: ""
|
||||
selector:
|
||||
text: {}
|
||||
|
||||
led_number:
|
||||
name: LED Number
|
||||
selector:
|
||||
select:
|
||||
options:
|
||||
- label: "LED 1 (Top)"
|
||||
value: "1"
|
||||
- label: "LED 2"
|
||||
value: "2"
|
||||
- label: "LED 3"
|
||||
value: "3"
|
||||
- label: "LED 4"
|
||||
value: "4"
|
||||
- label: "LED 5"
|
||||
value: "5"
|
||||
- label: "LED 6"
|
||||
value: "6"
|
||||
- label: "LED 7 (Bottom)"
|
||||
value: "7"
|
||||
|
||||
led_color:
|
||||
name: LED Color
|
||||
selector:
|
||||
select:
|
||||
options:
|
||||
- label: "Off"
|
||||
value: "0"
|
||||
- label: "Red"
|
||||
value: "1"
|
||||
- label: "Green"
|
||||
value: "2"
|
||||
- label: "Blue"
|
||||
value: "3"
|
||||
- label: "Magenta"
|
||||
value: "4"
|
||||
- label: "Yellow"
|
||||
value: "5"
|
||||
- label: "Cyan"
|
||||
value: "6"
|
||||
- label: "White"
|
||||
value: "7"
|
||||
|
||||
blink_mode:
|
||||
name: Blink Mode
|
||||
selector:
|
||||
select:
|
||||
options:
|
||||
- label: "Solid"
|
||||
value: "0"
|
||||
- label: "Fast Blink"
|
||||
value: "1"
|
||||
- label: "Slow Blink"
|
||||
value: "2"
|
||||
|
||||
mode: single
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: !input monitored_entity
|
||||
|
||||
action:
|
||||
- variables:
|
||||
actual_state: "{{ states[ (input.monitored_entity) ].state }}"
|
||||
target_state: >
|
||||
{{ iif(input.custom_expected_state | length > 0, input.custom_expected_state, input.expected_state) }}
|
||||
matched: "{{ actual_state == target_state }}"
|
||||
- variables:
|
||||
color: "{{ iif(matched, (input.led_color | int(0)), 0) }}"
|
||||
blink: "{{ iif(matched, (input.blink_mode | int(0)), 0) }}"
|
||||
led_value: "{{ (color * 16) + blink }}"
|
||||
led_param: "{{ 20 + (input.led_number | int(1)) }}"
|
||||
- service: zwave_js.set_config_parameter
|
||||
target:
|
||||
device_id: !input target_device
|
||||
data:
|
||||
parameter: "{{ led_param }}"
|
||||
value: "{{ led_value }}"
|
||||
|
Reference in New Issue
Block a user