Part of the nice experience going out to dinner is both the food, music and mood lights.
Why not get the same experience at home with a simple automation combining Spotify music and light scene combined with colorful Philips Hue lights?
Here is my automation.
Automation:
# Dinner mode - set lights and turn on music
- alias: Dinner mode
id: dinner_mode
description: ''
trigger:
- platform: state
entity_id: input_boolean.dinner_mode
to: 'on'
- platform: state
entity_id: input_boolean.dinner_mode
to: 'off'
condition: []
action:
- choose:
# Dinner mode on
- conditions:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.dinner_mode
state: 'on'
sequence:
- service: scene.turn_on
entity_id: scene.dinner_mode
- service: media_player.select_source
data:
source: Living-Receiver
target:
device_id: 13311331
- service: media_player.play_media
data:
entity_id: media_player.spotify
media_content_id: https://open.spotify.com/playlist/xxxxxxxxxxxxxxxxx
media_content_type: playlist
# Dinner mode off
- conditions:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.dinner_mode
state: 'off'
sequence:
- service: automation.trigger
entity_id: automation.turn_on_scene_1st_floor_dim
- service: homeassistant.turn_off
entity_id: media_player.living_room_receiver_musiccast
Input boolean:
dinner_mode: name: Dinner mode initial: off
Scene:
- name: Dinner mode
entities:
light.kitchen_dimmer_n21_dimmer:
state: on
brightness: 58
light.living_room_dimmer2_n22_dimmer:
state: on
brightness: 58
light.living_room_dimmer1_n23_dimmer:
state: on
brightness: 58
light.kitchen_bench_lamp:
state: on
brightness: 20
light.kitchen_lamp:
state: on
brightness: 20
xy_color: [0.217, 0.077]
light.living_room_lamp:
state: on
brightness: 20
xy_color: [0.217, 0.077]
light.living_room_media_1:
state: on
brightness: 20
color_temp: 370
light.living_room_media_2:
state: on
brightness: 20
color_temp: 370
light.sofa_lamp:
state: on
brightness: 20
xy_color: [0.217, 0.077]