mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-02 23:54:25 +00:00
Refactor using sequence choosers
This commit is contained in:
@@ -32,6 +32,8 @@ cards:
|
||||
service: automation.reload
|
||||
- entity: sensor.automations_count
|
||||
icon: mdi:pound
|
||||
- automation.living_room_opple
|
||||
- automation.bedroom_opple
|
||||
- automation.titanium_turn_off_when_idle
|
||||
- automation.titanium_notify_on_vibration_sensor_move
|
||||
- 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_off
|
||||
- type: divider
|
||||
- automation.lighting_hallway_day_mode_motion_turn_lights_on
|
||||
- automation.lighting_hallway_day_mode_motion_turn_lights_off
|
||||
- automation.lighting_hallway_night_mode_motion_turn_lights_on
|
||||
- automation.lighting_hallway_night_mode_motion_turn_lights_off
|
||||
- automation.lighting_hallway_motion_on
|
||||
- automation.lighting_hallway_motion_off
|
||||
- type: divider
|
||||
- automation.lighting_sync_tasmota_states_on_start_up
|
||||
- type: divider
|
||||
@@ -199,52 +199,6 @@ cards:
|
||||
- automation.wallmote_living_room_4_tap_toggle_ac
|
||||
- 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
|
||||
title: Magic Cube
|
||||
show_header_toggle: false
|
||||
|
||||
@@ -21,215 +21,156 @@ sensor:
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
|
||||
automation:
|
||||
|
||||
# Lights
|
||||
- alias: Lighting · Master bedroom · Opple · Turn off all lights on 1 click
|
||||
- alias: Bedroom · Opple
|
||||
mode: queued
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_1_single'
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id: light.master_bedroom
|
||||
- choose:
|
||||
- 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
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_2_single'
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.master_bedroom
|
||||
brightness_pct: >-
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_2_single'
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.master_bedroom
|
||||
brightness_pct: >-
|
||||
|
||||
{% if not is_state('input_select.house_mode', 'day') %}
|
||||
40
|
||||
{% else %}
|
||||
100
|
||||
{% endif %}
|
||||
{% if not is_state('input_select.house_mode', 'day') %}
|
||||
40
|
||||
{% else %}
|
||||
100
|
||||
{% endif %}
|
||||
|
||||
- alias: Lighting · Master bedroom · Opple · Turn off lights on 1 double
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_1_double'
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id: light.master_bedroom_main
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_1_double'
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
entity_id: light.master_bedroom_main
|
||||
|
||||
- alias: Lighting · Master bedroom · Opple · Turn on lights on 2 double
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_2_double'
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.master_bedroom_main
|
||||
brightness_pct: >-
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_2_double'
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.master_bedroom_main
|
||||
brightness_pct: >-
|
||||
|
||||
{% if not is_state('input_select.house_mode', 'day') %}
|
||||
40
|
||||
{% else %}
|
||||
100
|
||||
{% endif %}
|
||||
{% if not is_state('input_select.house_mode', 'day') %}
|
||||
40
|
||||
{% else %}
|
||||
100
|
||||
{% endif %}
|
||||
|
||||
- alias: Lighting · Master bedroom · Opple · Turn off all ambient lights on 1 triple
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_1_triple'
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- light.bedside
|
||||
- light.bed_led
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_1_triple'
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- light.bedside
|
||||
- light.bed_led
|
||||
|
||||
- alias: Lighting · Master bedroom · Opple · Turn on ambient lights on 2 triple
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_2_triple'
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id:
|
||||
- light.bedside
|
||||
- light.bed_led
|
||||
brightness_pct: >-
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_2_triple'
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id:
|
||||
- light.bedside
|
||||
- light.bed_led
|
||||
brightness_pct: >-
|
||||
|
||||
{% if not is_state('input_select.house_mode', 'day') %}
|
||||
40
|
||||
{% else %}
|
||||
100
|
||||
{% endif %}
|
||||
{% if not is_state('input_select.house_mode', 'day') %}
|
||||
40
|
||||
{% else %}
|
||||
100
|
||||
{% 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
|
||||
- alias: Media · Master bedroom · Opple · Toggle music on 3 single
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
condition:
|
||||
- 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
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_3_double'
|
||||
sequence:
|
||||
- service: script.sonos_join_tv
|
||||
|
||||
- alias: Media · Master bedroom · Opple · Bring tv on 3 double
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_3_double'
|
||||
action:
|
||||
- service: script.sonos_join_tv
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_3_triple'
|
||||
sequence:
|
||||
- service: script.sonos_join_bedroom
|
||||
|
||||
- alias: Media · Master bedroom · Opple · Bring bedroom on 3 triple
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_3_triple'
|
||||
action:
|
||||
- service: script.sonos_join_bedroom
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_3_release'
|
||||
sequence:
|
||||
- service: media_player.play_next
|
||||
entity_id: media_player.master_bedroom
|
||||
|
||||
- alias: Media · Master bedroom · Opple · Next song on 3 release
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_3_release'
|
||||
action:
|
||||
- service: media_player.play_next
|
||||
entity_id: media_player.master_bedroom
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_4_single'
|
||||
sequence:
|
||||
- service: script.music_play
|
||||
|
||||
- alias: Media · Master bedroom · Opple · Play chill on 4 single
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_4_single'
|
||||
action:
|
||||
- service: script.music_play
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_4_double'
|
||||
sequence:
|
||||
- service: script.music_play
|
||||
data:
|
||||
playlist: 'Starred'
|
||||
|
||||
- alias: Media · Master bedroom · Opple · Play Starred on 4 double
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_4_double'
|
||||
action:
|
||||
- service: script.music_play
|
||||
data:
|
||||
playlist: 'Starred'
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_4_triple'
|
||||
sequence:
|
||||
- service: script.music_play
|
||||
data:
|
||||
playlist: 'Retro'
|
||||
|
||||
- alias: Media · Master bedroom · Opple · Play Retro on 4 triple
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_4_triple'
|
||||
action:
|
||||
- service: script.music_play
|
||||
data:
|
||||
playlist: 'Retro'
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_5_single'
|
||||
sequence:
|
||||
- service: fan.turn_off
|
||||
entity_id: fan.philips_airpurifier
|
||||
|
||||
|
||||
# Climate
|
||||
- alias: Climate · Master bedroom · Opple · Turn off purifier on 5 single
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_1"
|
||||
condition:
|
||||
- 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
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_opple_action
|
||||
state: 'button_6_single'
|
||||
sequence:
|
||||
- service: fan.turn_on
|
||||
entity_id: fan.philips_airpurifier
|
||||
|
||||
@@ -21,265 +21,189 @@ sensor:
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
|
||||
automation:
|
||||
|
||||
# Lights
|
||||
- alias: Lighting · Living room · Opple · Turn off all lights on 1 click
|
||||
- alias: Living room · Opple
|
||||
mode: queued
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_1_single'
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id: light.living_room
|
||||
- choose:
|
||||
- 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
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_2_single'
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_2_single'
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room
|
||||
|
||||
- alias: Lighting · Living room · Opple · Turn off lights on 1 double
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_1_double'
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id: light.living_room_main
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_1_double'
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
entity_id: light.living_room_main
|
||||
|
||||
- alias: Lighting · Living room · Opple · Turn on lights on 2 double
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_2_double'
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room_main
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_2_double'
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room_main
|
||||
|
||||
- alias: Lighting · Living room · Opple · Turn off all ambient lights on 1 triple
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_1_triple'
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id: light.living_room_ambient
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_1_triple'
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
entity_id: light.living_room_ambient
|
||||
|
||||
- alias: Lighting · Living room · Opple · Turn on ambient lights on 2 triple
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_2_triple'
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room_ambient
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_2_triple'
|
||||
sequence:
|
||||
- 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
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_2_release'
|
||||
sequence:
|
||||
- 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
|
||||
- alias: Media · Living room · Opple · Toggle music on 3 single
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- 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
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_3_double'
|
||||
sequence:
|
||||
- service: script.sonos_join_tv
|
||||
|
||||
- alias: Media · Living room · Opple · Bring tv on 3 double
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_3_double'
|
||||
action:
|
||||
- service: script.sonos_join_tv
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_3_triple'
|
||||
sequence:
|
||||
- service: script.sonos_join_bedroom
|
||||
|
||||
- alias: Media · Living room · Opple · Bring bedroom on 3 triple
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_3_triple'
|
||||
action:
|
||||
- service: script.sonos_join_bedroom
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_3_release'
|
||||
sequence:
|
||||
- service: media_player.play_next
|
||||
entity_id: media_player.living_room
|
||||
|
||||
- alias: Media · Living room · Opple · Next song on 3 release
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_3_release'
|
||||
action:
|
||||
- service: media_player.play_next
|
||||
entity_id: media_player.living_room
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_4_single'
|
||||
sequence:
|
||||
- service: script.music_play
|
||||
|
||||
- alias: Media · Living room · Opple · Play chill on 4 single
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_4_single'
|
||||
action:
|
||||
- service: script.music_play
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_4_double'
|
||||
sequence:
|
||||
- service: script.music_play
|
||||
data:
|
||||
playlist: 'Starred'
|
||||
|
||||
- alias: Media · Living room · Opple · Play Starred on 4 double
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_4_double'
|
||||
action:
|
||||
- service: script.music_play
|
||||
data:
|
||||
playlist: 'Starred'
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_4_triple'
|
||||
sequence:
|
||||
- service: script.music_play
|
||||
data:
|
||||
playlist: 'Retro'
|
||||
|
||||
- alias: Media · Living room · Opple · Play Retro on 4 triple
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
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_single'
|
||||
sequence:
|
||||
- service: climate.turn_off
|
||||
entity_id: climate.toshiba_ac
|
||||
|
||||
- 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
|
||||
- alias: Climate · Living room · Opple · Turn off AC on 5 single
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_5_single'
|
||||
action:
|
||||
- service: climate.turn_off
|
||||
entity_id: climate.toshiba_ac
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_6_single'
|
||||
sequence:
|
||||
- service: script.toshiba_ac_on_cool
|
||||
|
||||
- alias: Climate · Living room · Opple · AC Temp down on 5 double
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_5_double'
|
||||
action:
|
||||
- service: climate.set_temperature
|
||||
entity_id: climate.toshiba_ac
|
||||
data_template:
|
||||
temperature: "{{ state_attr('climate.toshiba_ac', 'temperature') | int -1}}"
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_6_double'
|
||||
sequence:
|
||||
- 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
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_6_single'
|
||||
action:
|
||||
- service: script.toshiba_ac_on_cool
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.living_room_opple_action
|
||||
state: 'button_6_triple'
|
||||
sequence:
|
||||
- service: automation.turn_off
|
||||
entity_id: automation.tv_sonos_join_tv_on_google_cast
|
||||
|
||||
- alias: Climate · Living room · Opple · AC Temp up on 6 double
|
||||
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}}"
|
||||
- service: script.tv_fireplace
|
||||
|
||||
- alias: Media · Living room · Opple · Fireplace on 6 triple click
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/opple_2"
|
||||
condition:
|
||||
- condition: state
|
||||
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: sonos.join
|
||||
entity_id:
|
||||
- media_player.kitchen
|
||||
- media_player.bathroom
|
||||
data:
|
||||
master: media_player.master_bedroom
|
||||
|
||||
- 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
|
||||
# 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
|
||||
|
||||
@@ -1,74 +1,53 @@
|
||||
automation:
|
||||
- alias: Lighting · Hallway · Day mode · Motion · Turn lights on
|
||||
- alias: Lighting · Hallway · Motion On
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.hallway_motion_occupancy
|
||||
to: "on"
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: input_select.house_mode
|
||||
state: 'day'
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.hallway
|
||||
- choose:
|
||||
- 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:
|
||||
platform: state
|
||||
entity_id: binary_sensor.hallway_motion_occupancy
|
||||
to: "off"
|
||||
for:
|
||||
minutes: 5
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: input_select.house_mode
|
||||
state: 'day'
|
||||
action:
|
||||
- service: light.turn_off
|
||||
entity_id: light.hallway
|
||||
|
||||
- alias: Lighting · Hallway · Night mode · Motion · Turn lights on
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.hallway_motion_occupancy
|
||||
to: "on"
|
||||
condition:
|
||||
condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house_mode
|
||||
state: 'day'
|
||||
action:
|
||||
- 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 · 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
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: state
|
||||
entity_id: input_select.house_mode
|
||||
state: 'day'
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
entity_id: light.hallway
|
||||
default:
|
||||
- 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