Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Toggle through scenes
alias: 'Remote - Next scene'
id: '6999bb6f-2240-4351-8713-9b5ff51ae34d'
description: ''
initial_state: true
# mode: queued
- platform: device
domain: zha
device_id: 9cc8f74f10a011ebaccc019f907cbc1f # Bedroom Wall Light Switch
subtype: turn_on
type: remote_button_short_press
- platform: device
domain: zha
device_id: 9cc756d410a011ebb5418935c0e9e21d # Bedroom Light Switch
subtype: turn_on
type: remote_button_short_press
condition: or
# We only want to change the scene with the remote 'On'button when the lights are already on.
- condition: state
entity_id: light.bedroom_lightgroup
state: 'on'
# We want to be able to change from 'Off' scene when it is used.
- condition: state
entity_id: input_select.bedroom_scenes
state: 'Off'
# Move to the next scene based on the current activity of the room.
- service: input_select.select_next
entity_id: input_select.bedroom_scenes
# Turn on the scene we have just selected.
# Note I use the replace function to remove spaces and replace them with underscores so I can use friendly names in the helper.
- service: scene.turn_on
entity_id: "scene.bedroom_{{ states('input_select.bedroom_scenes') | replace(' ', '_') | replace('(', '') | replace(')', '') }}"
name: Bedroom scenes
- Bright
- Subtle
- Concentrate
- Dimmed
- Night Light
- Subtle and TV
- Bed Light
- Bed Light and TV
- Ambilight
- Sexy time
- 'Off'
icon: mdi:lightbulb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment