mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-09-06 18:08:45 +00:00
Refactor using sequence choosers
This commit is contained in:
@@ -32,6 +32,8 @@ cards:
|
|||||||
service: automation.reload
|
service: automation.reload
|
||||||
- entity: sensor.automations_count
|
- entity: sensor.automations_count
|
||||||
icon: mdi:pound
|
icon: mdi:pound
|
||||||
|
- automation.living_room_opple
|
||||||
|
- automation.bedroom_opple
|
||||||
- automation.titanium_turn_off_when_idle
|
- automation.titanium_turn_off_when_idle
|
||||||
- automation.titanium_notify_on_vibration_sensor_move
|
- automation.titanium_notify_on_vibration_sensor_move
|
||||||
- automation.speech_enable_when_meeting_is_over
|
- automation.speech_enable_when_meeting_is_over
|
||||||
@@ -72,10 +74,8 @@ cards:
|
|||||||
- automation.lighting_kitchen_night_mode_motion_turn_lights_on
|
- automation.lighting_kitchen_night_mode_motion_turn_lights_on
|
||||||
- automation.lighting_kitchen_night_mode_motion_turn_lights_off
|
- automation.lighting_kitchen_night_mode_motion_turn_lights_off
|
||||||
- type: divider
|
- type: divider
|
||||||
- automation.lighting_hallway_day_mode_motion_turn_lights_on
|
- automation.lighting_hallway_motion_on
|
||||||
- automation.lighting_hallway_day_mode_motion_turn_lights_off
|
- automation.lighting_hallway_motion_off
|
||||||
- automation.lighting_hallway_night_mode_motion_turn_lights_on
|
|
||||||
- automation.lighting_hallway_night_mode_motion_turn_lights_off
|
|
||||||
- type: divider
|
- type: divider
|
||||||
- automation.lighting_sync_tasmota_states_on_start_up
|
- automation.lighting_sync_tasmota_states_on_start_up
|
||||||
- type: divider
|
- type: divider
|
||||||
@@ -199,52 +199,6 @@ cards:
|
|||||||
- automation.wallmote_living_room_4_tap_toggle_ac
|
- automation.wallmote_living_room_4_tap_toggle_ac
|
||||||
- automation.wallmote_living_room_4_hold_toggle_titanium
|
- automation.wallmote_living_room_4_hold_toggle_titanium
|
||||||
|
|
||||||
- type: entities
|
|
||||||
title: Bedroom Opple (opple_1)
|
|
||||||
show_header_toggle: true
|
|
||||||
icon: mdi:light-switch
|
|
||||||
entities:
|
|
||||||
- automation.lighting_master_bedroom_opple_turn_off_all_lights_on_1_click
|
|
||||||
- automation.lighting_master_bedroom_opple_turn_on_all_lights_on_2_click
|
|
||||||
- automation.lighting_master_bedroom_opple_turn_off_lights_on_1_double
|
|
||||||
- automation.lighting_master_bedroom_opple_turn_on_lights_on_2_double
|
|
||||||
- automation.lighting_master_bedroom_opple_turn_off_all_ambient_lights_on_1_triple
|
|
||||||
- automation.lighting_master_bedroom_opple_turn_on_ambient_lights_on_2_triple
|
|
||||||
- automation.media_master_bedroom_opple_toggle_music_on_3_single
|
|
||||||
- automation.media_master_bedroom_opple_bring_tv_on_3_double
|
|
||||||
- automation.media_master_bedroom_opple_bring_bedroom_on_3_triple
|
|
||||||
- automation.media_master_bedroom_opple_next_song_on_3_release
|
|
||||||
- automation.media_master_bedroom_opple_play_chill_on_4_single
|
|
||||||
- automation.media_master_bedroom_opple_play_starred_on_4_double
|
|
||||||
- automation.media_master_bedroom_opple_play_retro_on_4_triple
|
|
||||||
- automation.climate_master_bedroom_opple_turn_off_purifier_on_5_single
|
|
||||||
- automation.climate_master_bedroom_opple_turn_on_purifier_on_6_single
|
|
||||||
|
|
||||||
- type: entities
|
|
||||||
title: Living room Opple (opple_2)
|
|
||||||
show_header_toggle: true
|
|
||||||
icon: mdi:light-switch
|
|
||||||
entities:
|
|
||||||
- automation.lighting_living_room_opple_turn_off_all_lights_on_1_click
|
|
||||||
- automation.lighting_living_room_opple_turn_on_all_lights_on_2_click
|
|
||||||
- automation.lighting_living_room_opple_turn_off_lights_on_1_double
|
|
||||||
- automation.lighting_living_room_opple_turn_on_lights_on_2_double
|
|
||||||
- automation.lighting_living_room_opple_turn_off_all_ambient_lights_on_1_triple
|
|
||||||
- automation.lighting_living_room_opple_turn_on_ambient_lights_on_2_triple
|
|
||||||
- automation.lighting_living_room_opple_ambient_lights_neon_on_2_release
|
|
||||||
- automation.media_living_room_opple_toggle_music_on_3_single
|
|
||||||
- automation.media_living_room_opple_bring_tv_on_3_double
|
|
||||||
- automation.media_living_room_opple_bring_bedroom_on_3_triple
|
|
||||||
- automation.media_living_room_opple_next_song_on_3_release
|
|
||||||
- automation.media_living_room_opple_play_chill_on_4_single
|
|
||||||
- automation.media_living_room_opple_play_starred_on_4_double
|
|
||||||
- automation.media_living_room_opple_play_retro_on_4_triple
|
|
||||||
- automation.climate_living_room_opple_turn_off_ac_on_5_single
|
|
||||||
- automation.climate_living_room_opple_ac_temp_down_on_5_double
|
|
||||||
- automation.climate_living_room_opple_turn_on_ac_on_6_single
|
|
||||||
- automation.climate_living_room_opple_ac_temp_up_on_6_double
|
|
||||||
- automation.media_living_room_opple_fireplace_on_6_triple_click
|
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Magic Cube
|
title: Magic Cube
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
|
|||||||
@@ -21,215 +21,156 @@ sensor:
|
|||||||
value_template: "{{ value_json.linkquality }}"
|
value_template: "{{ value_json.linkquality }}"
|
||||||
|
|
||||||
automation:
|
automation:
|
||||||
|
- alias: Bedroom · Opple
|
||||||
# Lights
|
mode: queued
|
||||||
- alias: Lighting · Master bedroom · Opple · Turn off all lights on 1 click
|
|
||||||
trigger:
|
trigger:
|
||||||
platform: mqtt
|
platform: mqtt
|
||||||
topic: "z2m_deconz/opple_1"
|
topic: "z2m_deconz/opple_1"
|
||||||
condition:
|
|
||||||
- condition: state
|
|
||||||
entity_id: sensor.bedroom_opple_action
|
|
||||||
state: 'button_1_single'
|
|
||||||
action:
|
action:
|
||||||
- service: light.turn_off
|
- choose:
|
||||||
entity_id: light.master_bedroom
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: sensor.bedroom_opple_action
|
||||||
|
state: 'button_1_single'
|
||||||
|
sequence:
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id: light.master_bedroom
|
||||||
|
|
||||||
- alias: Lighting · Master bedroom · Opple · Turn on all lights on 2 click
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.bedroom_opple_action
|
||||||
topic: "z2m_deconz/opple_1"
|
state: 'button_2_single'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: light.turn_on
|
||||||
entity_id: sensor.bedroom_opple_action
|
data_template:
|
||||||
state: 'button_2_single'
|
entity_id: light.master_bedroom
|
||||||
action:
|
brightness_pct: >-
|
||||||
- service: light.turn_on
|
|
||||||
data_template:
|
|
||||||
entity_id: light.master_bedroom
|
|
||||||
brightness_pct: >-
|
|
||||||
|
|
||||||
{% if not is_state('input_select.house_mode', 'day') %}
|
{% if not is_state('input_select.house_mode', 'day') %}
|
||||||
40
|
40
|
||||||
{% else %}
|
{% else %}
|
||||||
100
|
100
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
- alias: Lighting · Master bedroom · Opple · Turn off lights on 1 double
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.bedroom_opple_action
|
||||||
topic: "z2m_deconz/opple_1"
|
state: 'button_1_double'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: light.turn_off
|
||||||
entity_id: sensor.bedroom_opple_action
|
entity_id: light.master_bedroom_main
|
||||||
state: 'button_1_double'
|
|
||||||
action:
|
|
||||||
- service: light.turn_off
|
|
||||||
entity_id: light.master_bedroom_main
|
|
||||||
|
|
||||||
- alias: Lighting · Master bedroom · Opple · Turn on lights on 2 double
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.bedroom_opple_action
|
||||||
topic: "z2m_deconz/opple_1"
|
state: 'button_2_double'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: light.turn_on
|
||||||
entity_id: sensor.bedroom_opple_action
|
data_template:
|
||||||
state: 'button_2_double'
|
entity_id: light.master_bedroom_main
|
||||||
action:
|
brightness_pct: >-
|
||||||
- service: light.turn_on
|
|
||||||
data_template:
|
|
||||||
entity_id: light.master_bedroom_main
|
|
||||||
brightness_pct: >-
|
|
||||||
|
|
||||||
{% if not is_state('input_select.house_mode', 'day') %}
|
{% if not is_state('input_select.house_mode', 'day') %}
|
||||||
40
|
40
|
||||||
{% else %}
|
{% else %}
|
||||||
100
|
100
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
- alias: Lighting · Master bedroom · Opple · Turn off all ambient lights on 1 triple
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.bedroom_opple_action
|
||||||
topic: "z2m_deconz/opple_1"
|
state: 'button_1_triple'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: light.turn_off
|
||||||
entity_id: sensor.bedroom_opple_action
|
entity_id:
|
||||||
state: 'button_1_triple'
|
- light.bedside
|
||||||
action:
|
- light.bed_led
|
||||||
- service: light.turn_off
|
|
||||||
entity_id:
|
|
||||||
- light.bedside
|
|
||||||
- light.bed_led
|
|
||||||
|
|
||||||
- alias: Lighting · Master bedroom · Opple · Turn on ambient lights on 2 triple
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.bedroom_opple_action
|
||||||
topic: "z2m_deconz/opple_1"
|
state: 'button_2_triple'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: light.turn_on
|
||||||
entity_id: sensor.bedroom_opple_action
|
data_template:
|
||||||
state: 'button_2_triple'
|
entity_id:
|
||||||
action:
|
- light.bedside
|
||||||
- service: light.turn_on
|
- light.bed_led
|
||||||
data_template:
|
brightness_pct: >-
|
||||||
entity_id:
|
|
||||||
- light.bedside
|
|
||||||
- light.bed_led
|
|
||||||
brightness_pct: >-
|
|
||||||
|
|
||||||
{% if not is_state('input_select.house_mode', 'day') %}
|
{% if not is_state('input_select.house_mode', 'day') %}
|
||||||
40
|
40
|
||||||
{% else %}
|
{% else %}
|
||||||
100
|
100
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: sensor.bedroom_opple_action
|
||||||
|
state: 'button_3_single'
|
||||||
|
sequence:
|
||||||
|
- service: media_player.media_play_pause
|
||||||
|
entity_id: media_player.master_bedroom
|
||||||
|
|
||||||
# Audio
|
- conditions:
|
||||||
- alias: Media · Master bedroom · Opple · Toggle music on 3 single
|
- condition: state
|
||||||
trigger:
|
entity_id: sensor.bedroom_opple_action
|
||||||
platform: mqtt
|
state: 'button_3_double'
|
||||||
topic: "z2m_deconz/opple_1"
|
sequence:
|
||||||
condition:
|
- service: script.sonos_join_tv
|
||||||
- condition: state
|
|
||||||
entity_id: sensor.bedroom_opple_action
|
|
||||||
state: 'button_3_single'
|
|
||||||
action:
|
|
||||||
- service: media_player.media_play_pause
|
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
|
|
||||||
- alias: Media · Master bedroom · Opple · Bring tv on 3 double
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.bedroom_opple_action
|
||||||
topic: "z2m_deconz/opple_1"
|
state: 'button_3_triple'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: script.sonos_join_bedroom
|
||||||
entity_id: sensor.bedroom_opple_action
|
|
||||||
state: 'button_3_double'
|
|
||||||
action:
|
|
||||||
- service: script.sonos_join_tv
|
|
||||||
|
|
||||||
- alias: Media · Master bedroom · Opple · Bring bedroom on 3 triple
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.bedroom_opple_action
|
||||||
topic: "z2m_deconz/opple_1"
|
state: 'button_3_release'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: media_player.play_next
|
||||||
entity_id: sensor.bedroom_opple_action
|
entity_id: media_player.master_bedroom
|
||||||
state: 'button_3_triple'
|
|
||||||
action:
|
|
||||||
- service: script.sonos_join_bedroom
|
|
||||||
|
|
||||||
- alias: Media · Master bedroom · Opple · Next song on 3 release
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.bedroom_opple_action
|
||||||
topic: "z2m_deconz/opple_1"
|
state: 'button_4_single'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: script.music_play
|
||||||
entity_id: sensor.bedroom_opple_action
|
|
||||||
state: 'button_3_release'
|
|
||||||
action:
|
|
||||||
- service: media_player.play_next
|
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
|
|
||||||
- alias: Media · Master bedroom · Opple · Play chill on 4 single
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.bedroom_opple_action
|
||||||
topic: "z2m_deconz/opple_1"
|
state: 'button_4_double'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: script.music_play
|
||||||
entity_id: sensor.bedroom_opple_action
|
data:
|
||||||
state: 'button_4_single'
|
playlist: 'Starred'
|
||||||
action:
|
|
||||||
- service: script.music_play
|
|
||||||
|
|
||||||
- alias: Media · Master bedroom · Opple · Play Starred on 4 double
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.bedroom_opple_action
|
||||||
topic: "z2m_deconz/opple_1"
|
state: 'button_4_triple'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: script.music_play
|
||||||
entity_id: sensor.bedroom_opple_action
|
data:
|
||||||
state: 'button_4_double'
|
playlist: 'Retro'
|
||||||
action:
|
|
||||||
- service: script.music_play
|
|
||||||
data:
|
|
||||||
playlist: 'Starred'
|
|
||||||
|
|
||||||
- alias: Media · Master bedroom · Opple · Play Retro on 4 triple
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.bedroom_opple_action
|
||||||
topic: "z2m_deconz/opple_1"
|
state: 'button_5_single'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: fan.turn_off
|
||||||
entity_id: sensor.bedroom_opple_action
|
entity_id: fan.philips_airpurifier
|
||||||
state: 'button_4_triple'
|
|
||||||
action:
|
|
||||||
- service: script.music_play
|
|
||||||
data:
|
|
||||||
playlist: 'Retro'
|
|
||||||
|
|
||||||
|
- conditions:
|
||||||
# Climate
|
- condition: state
|
||||||
- alias: Climate · Master bedroom · Opple · Turn off purifier on 5 single
|
entity_id: sensor.bedroom_opple_action
|
||||||
trigger:
|
state: 'button_6_single'
|
||||||
platform: mqtt
|
sequence:
|
||||||
topic: "z2m_deconz/opple_1"
|
- service: fan.turn_on
|
||||||
condition:
|
entity_id: fan.philips_airpurifier
|
||||||
- condition: state
|
|
||||||
entity_id: sensor.bedroom_opple_action
|
|
||||||
state: 'button_5_single'
|
|
||||||
action:
|
|
||||||
- service: fan.turn_off
|
|
||||||
entity_id: fan.philips_airpurifier
|
|
||||||
|
|
||||||
- alias: Climate · Master bedroom · Opple · Turn on purifier on 6 single
|
|
||||||
trigger:
|
|
||||||
platform: mqtt
|
|
||||||
topic: "z2m_deconz/opple_1"
|
|
||||||
condition:
|
|
||||||
- condition: state
|
|
||||||
entity_id: sensor.bedroom_opple_action
|
|
||||||
state: 'button_6_single'
|
|
||||||
action:
|
|
||||||
- service: fan.turn_on
|
|
||||||
entity_id: fan.philips_airpurifier
|
|
||||||
|
|||||||
@@ -21,265 +21,189 @@ sensor:
|
|||||||
value_template: "{{ value_json.linkquality }}"
|
value_template: "{{ value_json.linkquality }}"
|
||||||
|
|
||||||
automation:
|
automation:
|
||||||
|
- alias: Living room · Opple
|
||||||
# Lights
|
mode: queued
|
||||||
- alias: Lighting · Living room · Opple · Turn off all lights on 1 click
|
|
||||||
trigger:
|
trigger:
|
||||||
platform: mqtt
|
platform: mqtt
|
||||||
topic: "z2m_deconz/opple_2"
|
topic: "z2m_deconz/opple_2"
|
||||||
condition:
|
|
||||||
- condition: state
|
|
||||||
entity_id: sensor.living_room_opple_action
|
|
||||||
state: 'button_1_single'
|
|
||||||
action:
|
action:
|
||||||
- service: light.turn_off
|
- choose:
|
||||||
entity_id: light.living_room
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: sensor.living_room_opple_action
|
||||||
|
state: 'button_1_single'
|
||||||
|
sequence:
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id: light.living_room
|
||||||
|
|
||||||
- alias: Lighting · Living room · Opple · Turn on all lights on 2 click
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.living_room_opple_action
|
||||||
topic: "z2m_deconz/opple_2"
|
state: 'button_2_single'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: light.turn_on
|
||||||
entity_id: sensor.living_room_opple_action
|
entity_id: light.living_room
|
||||||
state: 'button_2_single'
|
|
||||||
action:
|
|
||||||
- service: light.turn_on
|
|
||||||
entity_id: light.living_room
|
|
||||||
|
|
||||||
- alias: Lighting · Living room · Opple · Turn off lights on 1 double
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.living_room_opple_action
|
||||||
topic: "z2m_deconz/opple_2"
|
state: 'button_1_double'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: light.turn_off
|
||||||
entity_id: sensor.living_room_opple_action
|
entity_id: light.living_room_main
|
||||||
state: 'button_1_double'
|
|
||||||
action:
|
|
||||||
- service: light.turn_off
|
|
||||||
entity_id: light.living_room_main
|
|
||||||
|
|
||||||
- alias: Lighting · Living room · Opple · Turn on lights on 2 double
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.living_room_opple_action
|
||||||
topic: "z2m_deconz/opple_2"
|
state: 'button_2_double'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: light.turn_on
|
||||||
entity_id: sensor.living_room_opple_action
|
entity_id: light.living_room_main
|
||||||
state: 'button_2_double'
|
|
||||||
action:
|
|
||||||
- service: light.turn_on
|
|
||||||
entity_id: light.living_room_main
|
|
||||||
|
|
||||||
- alias: Lighting · Living room · Opple · Turn off all ambient lights on 1 triple
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.living_room_opple_action
|
||||||
topic: "z2m_deconz/opple_2"
|
state: 'button_1_triple'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: light.turn_off
|
||||||
entity_id: sensor.living_room_opple_action
|
entity_id: light.living_room_ambient
|
||||||
state: 'button_1_triple'
|
|
||||||
action:
|
|
||||||
- service: light.turn_off
|
|
||||||
entity_id: light.living_room_ambient
|
|
||||||
|
|
||||||
- alias: Lighting · Living room · Opple · Turn on ambient lights on 2 triple
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.living_room_opple_action
|
||||||
topic: "z2m_deconz/opple_2"
|
state: 'button_2_triple'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: light.turn_on
|
||||||
entity_id: sensor.living_room_opple_action
|
entity_id: light.living_room_ambient
|
||||||
state: 'button_2_triple'
|
|
||||||
action:
|
|
||||||
- service: light.turn_on
|
|
||||||
entity_id: light.living_room_ambient
|
|
||||||
|
|
||||||
- alias: Lighting · Living room · Opple · Ambient lights neon on 2 release
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.living_room_opple_action
|
||||||
topic: "z2m_deconz/opple_2"
|
state: 'button_2_release'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: script.scene_living_room_ambient_neon
|
||||||
entity_id: sensor.living_room_opple_action
|
|
||||||
state: 'button_2_release'
|
|
||||||
action:
|
|
||||||
- service: script.scene_living_room_ambient_neon
|
|
||||||
|
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: sensor.living_room_opple_action
|
||||||
|
state: 'button_3_single'
|
||||||
|
sequence:
|
||||||
|
- service: media_player.media_play_pause
|
||||||
|
entity_id: media_player.living_room
|
||||||
|
|
||||||
# Audio
|
- conditions:
|
||||||
- alias: Media · Living room · Opple · Toggle music on 3 single
|
- condition: state
|
||||||
trigger:
|
entity_id: sensor.living_room_opple_action
|
||||||
platform: mqtt
|
state: 'button_3_double'
|
||||||
topic: "z2m_deconz/opple_2"
|
sequence:
|
||||||
condition:
|
- service: script.sonos_join_tv
|
||||||
- condition: state
|
|
||||||
entity_id: sensor.living_room_opple_action
|
|
||||||
state: 'button_3_single'
|
|
||||||
action:
|
|
||||||
- service: media_player.media_play_pause
|
|
||||||
entity_id: media_player.living_room
|
|
||||||
|
|
||||||
- alias: Media · Living room · Opple · Bring tv on 3 double
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.living_room_opple_action
|
||||||
topic: "z2m_deconz/opple_2"
|
state: 'button_3_triple'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: script.sonos_join_bedroom
|
||||||
entity_id: sensor.living_room_opple_action
|
|
||||||
state: 'button_3_double'
|
|
||||||
action:
|
|
||||||
- service: script.sonos_join_tv
|
|
||||||
|
|
||||||
- alias: Media · Living room · Opple · Bring bedroom on 3 triple
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.living_room_opple_action
|
||||||
topic: "z2m_deconz/opple_2"
|
state: 'button_3_release'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: media_player.play_next
|
||||||
entity_id: sensor.living_room_opple_action
|
entity_id: media_player.living_room
|
||||||
state: 'button_3_triple'
|
|
||||||
action:
|
|
||||||
- service: script.sonos_join_bedroom
|
|
||||||
|
|
||||||
- alias: Media · Living room · Opple · Next song on 3 release
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.living_room_opple_action
|
||||||
topic: "z2m_deconz/opple_2"
|
state: 'button_4_single'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: script.music_play
|
||||||
entity_id: sensor.living_room_opple_action
|
|
||||||
state: 'button_3_release'
|
|
||||||
action:
|
|
||||||
- service: media_player.play_next
|
|
||||||
entity_id: media_player.living_room
|
|
||||||
|
|
||||||
- alias: Media · Living room · Opple · Play chill on 4 single
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.living_room_opple_action
|
||||||
topic: "z2m_deconz/opple_2"
|
state: 'button_4_double'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: script.music_play
|
||||||
entity_id: sensor.living_room_opple_action
|
data:
|
||||||
state: 'button_4_single'
|
playlist: 'Starred'
|
||||||
action:
|
|
||||||
- service: script.music_play
|
|
||||||
|
|
||||||
- alias: Media · Living room · Opple · Play Starred on 4 double
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.living_room_opple_action
|
||||||
topic: "z2m_deconz/opple_2"
|
state: 'button_4_triple'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: script.music_play
|
||||||
entity_id: sensor.living_room_opple_action
|
data:
|
||||||
state: 'button_4_double'
|
playlist: 'Retro'
|
||||||
action:
|
|
||||||
- service: script.music_play
|
|
||||||
data:
|
|
||||||
playlist: 'Starred'
|
|
||||||
|
|
||||||
- alias: Media · Living room · Opple · Play Retro on 4 triple
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.living_room_opple_action
|
||||||
topic: "z2m_deconz/opple_2"
|
state: 'button_5_single'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: climate.turn_off
|
||||||
entity_id: sensor.living_room_opple_action
|
entity_id: climate.toshiba_ac
|
||||||
state: 'button_4_triple'
|
|
||||||
action:
|
|
||||||
- service: script.music_play
|
|
||||||
data:
|
|
||||||
playlist: 'Retro'
|
|
||||||
|
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: sensor.living_room_opple_action
|
||||||
|
state: 'button_5_double'
|
||||||
|
sequence:
|
||||||
|
- service: climate.set_temperature
|
||||||
|
entity_id: climate.toshiba_ac
|
||||||
|
data_template:
|
||||||
|
temperature: "{{ state_attr('climate.toshiba_ac', 'temperature') | int -1}}"
|
||||||
|
|
||||||
# Climate
|
- conditions:
|
||||||
- alias: Climate · Living room · Opple · Turn off AC on 5 single
|
- condition: state
|
||||||
trigger:
|
entity_id: sensor.living_room_opple_action
|
||||||
platform: mqtt
|
state: 'button_6_single'
|
||||||
topic: "z2m_deconz/opple_2"
|
sequence:
|
||||||
condition:
|
- service: script.toshiba_ac_on_cool
|
||||||
- condition: state
|
|
||||||
entity_id: sensor.living_room_opple_action
|
|
||||||
state: 'button_5_single'
|
|
||||||
action:
|
|
||||||
- service: climate.turn_off
|
|
||||||
entity_id: climate.toshiba_ac
|
|
||||||
|
|
||||||
- alias: Climate · Living room · Opple · AC Temp down on 5 double
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.living_room_opple_action
|
||||||
topic: "z2m_deconz/opple_2"
|
state: 'button_6_double'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: climate.set_temperature
|
||||||
entity_id: sensor.living_room_opple_action
|
entity_id: climate.toshiba_ac
|
||||||
state: 'button_5_double'
|
data_template:
|
||||||
action:
|
temperature: "{{ state_attr('climate.toshiba_ac', 'temperature') | int +1}}"
|
||||||
- service: climate.set_temperature
|
|
||||||
entity_id: climate.toshiba_ac
|
|
||||||
data_template:
|
|
||||||
temperature: "{{ state_attr('climate.toshiba_ac', 'temperature') | int -1}}"
|
|
||||||
|
|
||||||
- alias: Climate · Living room · Opple · Turn on AC on 6 single
|
- conditions:
|
||||||
trigger:
|
- condition: state
|
||||||
platform: mqtt
|
entity_id: sensor.living_room_opple_action
|
||||||
topic: "z2m_deconz/opple_2"
|
state: 'button_6_triple'
|
||||||
condition:
|
sequence:
|
||||||
- condition: state
|
- service: automation.turn_off
|
||||||
entity_id: sensor.living_room_opple_action
|
entity_id: automation.tv_sonos_join_tv_on_google_cast
|
||||||
state: 'button_6_single'
|
|
||||||
action:
|
|
||||||
- service: script.toshiba_ac_on_cool
|
|
||||||
|
|
||||||
- alias: Climate · Living room · Opple · AC Temp up on 6 double
|
- service: script.tv_fireplace
|
||||||
trigger:
|
|
||||||
platform: mqtt
|
|
||||||
topic: "z2m_deconz/opple_2"
|
|
||||||
condition:
|
|
||||||
- condition: state
|
|
||||||
entity_id: sensor.living_room_opple_action
|
|
||||||
state: 'button_6_double'
|
|
||||||
action:
|
|
||||||
- service: climate.set_temperature
|
|
||||||
entity_id: climate.toshiba_ac
|
|
||||||
data_template:
|
|
||||||
temperature: "{{ state_attr('climate.toshiba_ac', 'temperature') | int +1}}"
|
|
||||||
|
|
||||||
- alias: Media · Living room · Opple · Fireplace on 6 triple click
|
- service: sonos.join
|
||||||
trigger:
|
entity_id:
|
||||||
platform: mqtt
|
- media_player.kitchen
|
||||||
topic: "z2m_deconz/opple_2"
|
- media_player.bathroom
|
||||||
condition:
|
data:
|
||||||
- condition: state
|
master: media_player.master_bedroom
|
||||||
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
|
# Music play, without the join
|
||||||
|
- service: media_player.volume_set
|
||||||
- service: sonos.join
|
entity_id: media_player.master_bedroom
|
||||||
entity_id:
|
data:
|
||||||
- media_player.kitchen
|
volume_level: 0.2
|
||||||
- media_player.bathroom
|
- service: media_player.shuffle_set
|
||||||
data:
|
entity_id: media_player.master_bedroom
|
||||||
master: media_player.master_bedroom
|
data:
|
||||||
|
shuffle: true
|
||||||
# Music play, without the join
|
- service: media_player.select_source
|
||||||
- service: media_player.volume_set
|
entity_id: media_player.master_bedroom
|
||||||
entity_id: media_player.master_bedroom
|
data:
|
||||||
data:
|
source: "Evening Chill"
|
||||||
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
|
|
||||||
|
|
||||||
|
- delay: 00:01:00
|
||||||
|
- service: automation.turn_on
|
||||||
|
entity_id: automation.tv_sonos_join_tv_on_google_cast
|
||||||
|
|||||||
@@ -1,74 +1,53 @@
|
|||||||
automation:
|
automation:
|
||||||
- alias: Lighting · Hallway · Day mode · Motion · Turn lights on
|
- alias: Lighting · Hallway · Motion On
|
||||||
trigger:
|
trigger:
|
||||||
platform: state
|
platform: state
|
||||||
entity_id: binary_sensor.hallway_motion_occupancy
|
entity_id: binary_sensor.hallway_motion_occupancy
|
||||||
to: "on"
|
to: "on"
|
||||||
condition:
|
|
||||||
condition: state
|
|
||||||
entity_id: input_select.house_mode
|
|
||||||
state: 'day'
|
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- choose:
|
||||||
entity_id: light.hallway
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_select.house_mode
|
||||||
|
state: 'day'
|
||||||
|
sequence:
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id: light.hallway
|
||||||
|
|
||||||
- alias: Lighting · Hallway · Day mode · Motion · Turn lights off
|
default:
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id: light.light_lohas_6
|
||||||
|
data:
|
||||||
|
brightness_pct: 30
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id: light.light_le_8
|
||||||
|
data:
|
||||||
|
brightness_pct: 13
|
||||||
|
|
||||||
|
- alias: Lighting · Hallway · Motion Off
|
||||||
trigger:
|
trigger:
|
||||||
platform: state
|
platform: state
|
||||||
entity_id: binary_sensor.hallway_motion_occupancy
|
entity_id: binary_sensor.hallway_motion_occupancy
|
||||||
to: "off"
|
to: "off"
|
||||||
for:
|
for:
|
||||||
minutes: 5
|
minutes: 5
|
||||||
condition:
|
|
||||||
condition: state
|
|
||||||
entity_id: input_select.house_mode
|
|
||||||
state: 'day'
|
|
||||||
action:
|
action:
|
||||||
- service: light.turn_off
|
- choose:
|
||||||
entity_id: light.hallway
|
- conditions:
|
||||||
|
condition: state
|
||||||
- alias: Lighting · Hallway · Night mode · Motion · Turn lights on
|
entity_id: input_select.house_mode
|
||||||
trigger:
|
state: 'day'
|
||||||
platform: state
|
sequence:
|
||||||
entity_id: binary_sensor.hallway_motion_occupancy
|
- service: light.turn_off
|
||||||
to: "on"
|
entity_id: light.hallway
|
||||||
condition:
|
default:
|
||||||
condition: not
|
- service: light.turn_on
|
||||||
conditions:
|
entity_id:
|
||||||
- condition: state
|
- light.light_le_8
|
||||||
entity_id: input_select.house_mode
|
- light.light_lohas_6
|
||||||
state: 'day'
|
data:
|
||||||
action:
|
brightness_pct: 100
|
||||||
- service: light.turn_on
|
- service: light.turn_off
|
||||||
entity_id: light.light_lohas_6
|
entity_id:
|
||||||
data:
|
- light.light_lohas_6
|
||||||
brightness_pct: 30
|
- light.light_le_8
|
||||||
- service: light.turn_on
|
|
||||||
entity_id: light.light_le_8
|
|
||||||
data:
|
|
||||||
brightness_pct: 13
|
|
||||||
|
|
||||||
- alias: Lighting · Hallway · Night mode · Motion · Turn lights off
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: binary_sensor.hallway_motion_occupancy
|
|
||||||
to: "off"
|
|
||||||
for:
|
|
||||||
minutes: 5
|
|
||||||
condition:
|
|
||||||
condition: not
|
|
||||||
conditions:
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_select.house_mode
|
|
||||||
state: 'day'
|
|
||||||
action:
|
|
||||||
- service: light.turn_on
|
|
||||||
entity_id:
|
|
||||||
- light.light_le_8
|
|
||||||
- light.light_lohas_6
|
|
||||||
data:
|
|
||||||
brightness_pct: 100
|
|
||||||
- service: light.turn_off
|
|
||||||
entity_id:
|
|
||||||
- light.light_lohas_6
|
|
||||||
- light.light_le_8
|
|
||||||
|
|||||||
Reference in New Issue
Block a user