mirror of
https://github.com/nikdoof/homeassistant-blueprints.git
synced 2025-12-23 06:19:25 +00:00
Use attributes.action for command
Changes in Zigbee2MQTT 1.18.3 and HomeAssistant 2021.05.04 mean that the state value can be blank on trigger. As we trigger from the attribute action anyway, use that as the command value.
This commit is contained in:
@@ -69,7 +69,7 @@ trigger:
|
||||
attribute: action
|
||||
action:
|
||||
- variables:
|
||||
command: "{{ trigger.to_state.state }}"
|
||||
command: '{{ trigger.to_state.attributes.action }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
- "{{ command == 'on-press' }}"
|
||||
|
||||
@@ -49,7 +49,7 @@ trigger:
|
||||
attribute: action
|
||||
action:
|
||||
- variables:
|
||||
command: "{{ trigger.to_state.state }}"
|
||||
command: '{{ trigger.to_state.attributes.action }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
- "{{ command == 'on-press' }}"
|
||||
|
||||
@@ -46,7 +46,7 @@ trigger:
|
||||
attribute: action
|
||||
action:
|
||||
- variables:
|
||||
command: "{{ trigger.to_state.state }}"
|
||||
command: '{{ trigger.to_state.attributes.action }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
- "{{ command == 'on' }}"
|
||||
|
||||
Reference in New Issue
Block a user