I have 5 Inovelli switches that I’ve got setup to control scenes. Right now I have an automation that is triggered for each one, but I was wondering what is the best practice to set something like this up? So far I’ve only setup one tap up/down (so I have 10 automations). However, each switch supports multiple taps up/down, and I have color bulbs, so I could end up with well over 50 automation’s if I continue with this method.
It looks like I can break the actual (on, off, color, brightness) into “scenes” for each light group, but I will still end up with a lot of automation’s to trigger the scene change.
Should I be using a template(s)? Would it be a single template for all switches, or only for the switches that control the same bulbs?
Do you have examples of your yaml? There may be ways to break it down into 5 template switches/lights and 1 or 2 scripts.
Sure, here’s my automations.yaml
- id: 58a3dfaeda614168a07d6069d138c304
alias: Cabinet On
trigger:
- event_data:
entity_id: zwave.ikcnl
scene_data: 0
scene_id: 2
event_type: zwave.scene_activated
platform: event
action:
- data:
entity_id: group.cabnets
service: light.turn_on
- id: '1530508461135'
alias: Cabinet Off
trigger:
- event_data:
entity_id: zwave.ikcnl
scene_data: 0
scene_id: 1
event_type: zwave.scene_activated
platform: event
condition: []
action:
- data:
entity_id: group.cabnets
service: light.turn_off
- alias: Cabinet Dim
trigger:
- event_data:
entity_id: zwave.ikcnl
scene_data: 1
scene_id: 1
event_type: zwave.scene_activated
platform: event
condition: []
action:
- data_template:
brightness: '{{ states.light.flex_rgbw_01.attributes.brightness | int - 50 }}'
entity_id: group.cabnets
service: light.turn_on
id: 0a1a61105e9943f197fb2584d6643698
- alias: Cabinet Brighten
trigger:
- event_data:
entity_id: zwave.ikcnl
scene_data: 1
scene_id: 2
event_type: zwave.scene_activated
platform: event
condition: []
action:
- data_template:
brightness: '{{ states.light.flex_rgbw_01.attributes.brightness | int + 50 }}'
entity_id: group.cabnets
service: light.turn_on
id: c3e26426294849c1b1d863058208fe28
- alias: Cabinet Red
trigger:
- event_data:
entity_id: zwave.ikcnl
scene_data: 3
scene_id: 2
event_type: zwave.scene_activated
platform: event
condition: []
action:
- data:
brightness: 255
rgb_color:
- 255
- 0
- 0
entity_id: group.cabnets
service: light.turn_on
id: 6b870a67f2124b0ab0176f7c10ea0686
- alias: Cabinet Blue
trigger:
- event_data:
entity_id: zwave.ikcnl
scene_data: 4
scene_id: 2
event_type: zwave.scene_activated
platform: event
condition: []
action:
- data:
brightness: 255
rgb_color:
- 0
- 0
- 255
entity_id: group.cabnets
service: light.turn_on
id: c3b0f2832e764ca6a4a14b62417f7c1b
- alias: Cabinet Green
trigger:
- event_data:
entity_id: zwave.ikcnl
scene_data: 5
scene_id: 2
event_type: zwave.scene_activated
platform: event
condition: []
action:
- data:
brightness: 255
rgb_color:
- 0
- 255
- 0
entity_id: group.cabnets
service: light.turn_on
id: 19fd3c60de014e5ab69ab7147494adcf
- alias: Dining On
trigger:
- event_data:
entity_id: zwave.inovelli_unknown_type1f00_id1f00_2
scene_data: 0
scene_id: 2
event_type: zwave.scene_activated
platform: event
action:
- data:
brightness: 255
entity_id: light.dining_room
service: light.turn_on
id: 4aac208d5442412c86712862f2e9ee4b
- alias: Dining Off
trigger:
- event_data:
entity_id: zwave.inovelli_unknown_type1f00_id1f00_2
scene_data: 0
scene_id: 1
event_type: zwave.scene_activated
platform: event
action:
- data:
entity_id: light.dining_room
service: light.turn_off
- id: '1531880498964'
alias: Driveway On
trigger:
- event: sunset
platform: sun
condition: []
action:
- data:
entity_id: switch.ge_14291_inwall_smart_switch_switch_2
service: switch.turn_on
- id: '1531880873517'
alias: Driveway Off
trigger:
- at: 00:05:00
platform: time
condition: []
action:
- data:
entity_id: switch.ge_14291_inwall_smart_switch_switch_2
service: switch.turn_off
- alias: Living Stairs Light On
trigger:
- event_data:
entity_id: zwave.inovelli_unknown_type1f00_id1f00_3
scene_data: 0
scene_id: 2
event_type: zwave.scene_activated
platform: event
action:
- data:
brightness: 255
entity_id: light.living_room
service: light.turn_on
- alias: Living Stairs Light Off
trigger:
- event_data:
entity_id: zwave.inovelli_unknown_type1f00_id1f00_3
scene_data: 0
scene_id: 1
event_type: zwave.scene_activated
platform: event
action:
- data:
entity_id: light.living_room
service: light.turn_off
- alias: Fireplace Light On
trigger:
- event_data:
entity_id: zwave.inovelli_unknown_type1f00_id1f00_5
scene_data: 0
scene_id: 2
event_type: zwave.scene_activated
platform: event
action:
- data:
brightness: 255
entity_id: light.fireplace
service: light.turn_on
- alias: Fireplace Light Off
trigger:
- event_data:
entity_id: zwave.inovelli_unknown_type1f00_id1f00_5
scene_data: 0
scene_id: 1
event_type: zwave.scene_activated
platform: event
action:
- data:
entity_id: light.fireplace
service: light.turn_off
- alias: Dining Load Light On
trigger:
- event_data:
entity_id: zwave.inovelli_unknown_type1f00_id1f00_6
scene_data: 0
scene_id: 2
event_type: zwave.scene_activated
platform: event
action:
- data:
brightness: 255
entity_id: light.dining_room
service: light.turn_on
- alias: Dining Load Light Off
trigger:
- event_data:
entity_id: zwave.inovelli_unknown_type1f00_id1f00_6
scene_data: 0
scene_id: 1
event_type: zwave.scene_activated
platform: event
action:
- data:
entity_id: light.dining_room
service: light.turn_off
- alias: Living Room Light On
trigger:
- event_data:
entity_id: zwave.inovelli_unknown_type1f00_id1f00_4
scene_data: 0
scene_id: 2
event_type: zwave.scene_activated
platform: event
action:
- data:
brightness: 255
entity_id: light.living
service: light.turn_on
- alias: Living Room Light Off
trigger:
- event_data:
entity_id: zwave.inovelli_unknown_type1f00_id1f00_4
scene_data: 0
scene_id: 1
event_type: zwave.scene_activated
platform: event
action:
- data:
entity_id: light.living
service: light.turn_off