Cycle through a list of 8 different scenes using an input_number. Cycling through these values can be done using a slider or assigning increase, decrease and set services of this input_number to a button
Very usful tocontrol several lights in one single room. Using just table lights in the lower levels and enabling ceiling lights in the higher levels
IMPORTANT: Create an input_number (1 to 7, step 1) to use!
blueprint:
name: Scene Revolver Slider
description: "Cycle through a list of 8 different scenes using an input_number. Cycling through these values can be done using a slider or assigning increase, decrease and set services of this input_number to a button"
domain: automation
input:
Variable:
name: Variable
description: Integer variable used to loop through
selector:
entity:
domain: input_number
scene_0:
name: Scene 0
description: Scene that is activated when selector becomes 0
default: []
selector:
entity:
domain: scene
scene_1:
name: Scene 1
description: Scene that is activated when selector becomes 1
default: []
selector:
entity:
domain: scene
scene_2:
name: Scene 2
description: Scene that is activated when selector becomes 2
default: []
selector:
entity:
domain: scene
scene_3:
name: Scene 3
description: Scene that is activated when selector becomes 3
default: []
selector:
entity:
domain: scene
scene_4:
name: Scene 4
description: Scene that is activated when selector becomes 4
default: []
selector:
entity:
domain: scene
scene_5:
name: Scene 5
description: Scene that is activated when selector becomes 5
default: []
selector:
entity:
domain: scene
scene_6:
name: Scene 6
description: Scene that is activated when selector becomes 6
default: []
selector:
entity:
domain: scene
scene_7:
name: Scene 7
description: Scene that is activated when selector becomes 7
default: []
selector:
entity:
domain: scene
mode: single
trigger:
- platform: state
entity_id: !input 'Variable'
action:
- variables:
scene_id: !input 'Variable'
- choose:
- conditions:
- condition: numeric_state
entity_id: !input 'Variable'
above: '0.9'
below: '1.1'
sequence:
- service: scene.turn_on
target:
entity_id: !input 'scene_1'
- conditions:
- condition: numeric_state
entity_id: !input 'Variable'
above: '1.9'
below: '2.1'
sequence:
- service: scene.turn_on
target:
entity_id: !input 'scene_2'
- conditions:
- condition: numeric_state
entity_id: !input 'Variable'
above: '2.9'
below: '3.1'
sequence:
- service: scene.turn_on
target:
entity_id: !input 'scene_3'
- conditions:
- condition: numeric_state
entity_id: !input 'Variable'
above: '3.9'
below: '4.1'
sequence:
- service: scene.turn_on
target:
entity_id: !input 'scene_4'
- conditions:
- condition: numeric_state
entity_id: !input 'Variable'
above: '4.9'
below: '5.1'
sequence:
- service: scene.turn_on
target:
entity_id: !input 'scene_5'
- conditions:
- condition: numeric_state
entity_id: !input 'Variable'
above: '5.9'
below: '6.1'
sequence:
- service: scene.turn_on
target:
entity_id: !input 'scene_6'
- conditions:
- condition: numeric_state
entity_id: !input 'Variable'
above: '6.9'
below: '7.1'
sequence:
- service: scene.turn_on
target:
entity_id: !input 'scene_7'
- conditions:
- condition: numeric_state
entity_id: !input 'Variable'
above: '-0.1'
below: '0.1'
sequence:
- service: scene.turn_on
target:
entity_id: !input 'scene_0'