mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-13 19:54:42 +00:00
Opple / fireplace / sonos changes
This commit is contained in:
@@ -23,7 +23,7 @@ sensor:
|
||||
automation:
|
||||
|
||||
# Lights
|
||||
- alias: Lighting · Master bedroom · Opple · Turn off lights on 1 click
|
||||
- alias: Lighting · Master bedroom · Opple · Turn off all lights on 1 click
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
@@ -33,9 +33,9 @@ automation:
|
||||
state: 'button_1_single'
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id: light.master_bedroom_main
|
||||
entity_id: light.master_bedroom
|
||||
|
||||
- alias: Lighting · Master bedroom · Opple · Turn on lights on 2 click
|
||||
- alias: Lighting · Master bedroom · Opple · Turn on all lights on 2 click
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
@@ -46,7 +46,7 @@ automation:
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.master_bedroom_main
|
||||
entity_id: light.master_bedroom
|
||||
brightness_pct: >-
|
||||
|
||||
{% if not is_state('input_select.house_mode', 'day') %}
|
||||
@@ -55,7 +55,7 @@ automation:
|
||||
100
|
||||
{% endif %}
|
||||
|
||||
- alias: Lighting · Master bedroom · Opple · Turn off all lights on 1 double
|
||||
- alias: Lighting · Master bedroom · Opple · Turn off lights on 1 double
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
@@ -65,9 +65,9 @@ automation:
|
||||
state: 'button_1_double'
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id: light.master_bedroom
|
||||
entity_id: light.master_bedroom_main
|
||||
|
||||
- alias: Lighting · Master bedroom · Opple · Turn on all lights on 2 double
|
||||
- alias: Lighting · Master bedroom · Opple · Turn on lights on 2 double
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
@@ -78,7 +78,7 @@ automation:
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.master_bedroom
|
||||
entity_id: light.master_bedroom_main
|
||||
brightness_pct: >-
|
||||
|
||||
{% if not is_state('input_select.house_mode', 'day') %}
|
||||
|
||||
@@ -23,7 +23,7 @@ sensor:
|
||||
automation:
|
||||
|
||||
# Lights
|
||||
- alias: Lighting · Living room · Opple · Turn off lights on 1 click
|
||||
- alias: Lighting · Living room · Opple · Turn off all lights on 1 click
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
@@ -33,9 +33,9 @@ automation:
|
||||
state: 'button_1_single'
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id: light.living_room_main
|
||||
entity_id: light.living_room
|
||||
|
||||
- alias: Lighting · Living room · Opple · Turn on lights on 2 click
|
||||
- alias: Lighting · Living room · Opple · Turn on all lights on 2 click
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
@@ -45,9 +45,9 @@ automation:
|
||||
state: 'button_2_single'
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room_main
|
||||
entity_id: light.living_room
|
||||
|
||||
- alias: Lighting · Living room · Opple · Turn off all lights on 1 double
|
||||
- alias: Lighting · Living room · Opple · Turn off lights on 1 double
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
@@ -57,9 +57,9 @@ automation:
|
||||
state: 'button_1_double'
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id: light.living_room
|
||||
entity_id: light.living_room_main
|
||||
|
||||
- alias: Lighting · Living room · Opple · Turn on all lights on 2 double
|
||||
- alias: Lighting · Living room · Opple · Turn on lights on 2 double
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
@@ -69,7 +69,7 @@ automation:
|
||||
state: 'button_2_double'
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room
|
||||
entity_id: light.living_room_main
|
||||
|
||||
- alias: Lighting · Living room · Opple · Turn off all ambient lights on 1 triple
|
||||
trigger:
|
||||
@@ -95,6 +95,17 @@ automation:
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room_ambient
|
||||
|
||||
- alias: Lighting · Living room · Opple · Ambient lights neon on 2 release
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_2_release'
|
||||
action:
|
||||
- service: script.scene_living_room_ambient_neon
|
||||
|
||||
|
||||
# Audio
|
||||
- alias: Media · Living room · Opple · Toggle music on 3 single
|
||||
@@ -242,5 +253,33 @@ automation:
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_6_triple'
|
||||
action:
|
||||
- service: automation.turn_off
|
||||
entity_id: automation.tv_sonos_join_tv_on_google_cast
|
||||
|
||||
- service: script.tv_fireplace
|
||||
|
||||
- service: sonos.join
|
||||
entity_id:
|
||||
- media_player.kitchen
|
||||
- media_player.bathroom
|
||||
data:
|
||||
master: media_player.master_bedroom
|
||||
|
||||
# Music play, without the join
|
||||
- service: media_player.volume_set
|
||||
entity_id: media_player.master_bedroom
|
||||
data:
|
||||
volume_level: 0.2
|
||||
- service: media_player.shuffle_set
|
||||
entity_id: media_player.master_bedroom
|
||||
data:
|
||||
shuffle: true
|
||||
- service: media_player.select_source
|
||||
entity_id: media_player.master_bedroom
|
||||
data:
|
||||
source: "Evening Chill"
|
||||
|
||||
- delay: 00:01:00
|
||||
- service: automation.turn_on
|
||||
entity_id: automation.tv_sonos_join_tv_on_google_cast
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ script:
|
||||
alias: TV · Fireplace
|
||||
sequence:
|
||||
- service: script.tv_prepare_for_playback
|
||||
data:
|
||||
volume_level: 0.08
|
||||
data_template:
|
||||
volume_level: "{{ volume_level | default(0.1) }}"
|
||||
- service: media_extractor.play_media
|
||||
entity_id: media_player.shield
|
||||
data:
|
||||
@@ -92,10 +92,7 @@ automation:
|
||||
entity_id: input_select.house_mode
|
||||
state: "day"
|
||||
action:
|
||||
- service: sonos.join
|
||||
data:
|
||||
master: media_player.master_bedroom
|
||||
entity_id: media_player.living_room
|
||||
- service: script.sonos_join_bedroom
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "📺 Media Module · "
|
||||
@@ -116,7 +113,6 @@ automation:
|
||||
message: "Sync TV state · Turning Shield on - TV is on"
|
||||
domain: media_player
|
||||
|
||||
|
||||
- alias: TV · State · Sync on TV off
|
||||
trigger:
|
||||
platform: state
|
||||
@@ -170,11 +166,17 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: media_player.nvidia_shield
|
||||
to: 'playing'
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: "{{ state_attr('media_player.nvidia_shield', 'source') == 'Google Cast' }}"
|
||||
action:
|
||||
- service: script.sonos_join_tv
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "📺 Media Module · "
|
||||
message: "TV · Google Cast - Joining Sonoses"
|
||||
domain: media_player
|
||||
|
||||
homeassistant:
|
||||
customize:
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
script:
|
||||
scene_living_room_ambient_neon:
|
||||
icon: "mdi:weather-night"
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
entity_id: light.light_avatar_small_1
|
||||
data:
|
||||
xy_color: [0.668, 0.284]
|
||||
brightness_pct: 80
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room_ambient_main
|
||||
data:
|
||||
rgb_color: [0, 255, 190]
|
||||
brightness_pct: 100
|
||||
@@ -51,6 +51,10 @@ script:
|
||||
entity_id: group.all_sonos
|
||||
data:
|
||||
master: media_player.living_room
|
||||
- service: media_player.select_source
|
||||
entity_id: media_player.living_room
|
||||
data:
|
||||
source: TV
|
||||
sonos_bathroom_up:
|
||||
alias: Sonos · Bathroom up
|
||||
sequence:
|
||||
|
||||
Reference in New Issue
Block a user