Update inovelli_mode_cycling blueprint to use event entity
Change from sensor-based to event-based trigger for Inovelli button presses. This aligns with Zigbee2MQTT's modern event entity approach and matches the Phase 1 plan specification. Changes: - Replace switch_action_sensor (sensor domain) with switch_action_event (event domain) - Update trigger from platform:state to platform:event with event_data - Use state_changed event type for proper event handling This provides more reliable button press detection and cleaner event handling compared to the older sensor state monitoring approach.
This commit is contained in:
@@ -22,13 +22,12 @@ blueprint:
|
||||
description: Press config button to cycle through lighting modes with LED feedback
|
||||
domain: automation
|
||||
input:
|
||||
switch_action_sensor:
|
||||
name: Switch Action Sensor
|
||||
description: The sensor entity that reports button presses (sensor.xxx_action)
|
||||
switch_action_event:
|
||||
name: Switch Action Event
|
||||
description: The event entity that reports button presses (event.xxx_action)
|
||||
selector:
|
||||
entity:
|
||||
domain: sensor
|
||||
integration: mqtt
|
||||
domain: event
|
||||
|
||||
mode_input_select:
|
||||
name: Mode Input Select
|
||||
@@ -54,9 +53,11 @@ mode: single
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: !input switch_action_sensor
|
||||
to: "config_single"
|
||||
- platform: event
|
||||
event_type: state_changed
|
||||
event_data:
|
||||
entity_id: !input switch_action_event
|
||||
new_state.state: "config_single"
|
||||
|
||||
action:
|
||||
- variables:
|
||||
|
||||
Reference in New Issue
Block a user