mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-05 08:44:24 +00:00
More bedroom scenes and switch automation
This commit is contained in:
@@ -58,6 +58,7 @@ cards:
|
||||
- automation.living_room_desk_switch
|
||||
- automation.bedroom_opple
|
||||
- automation.bedroom_bedside_switch
|
||||
- automation.bedroom_aqara_switch
|
||||
- automation.bathroom_switch
|
||||
|
||||
- type: entities
|
||||
@@ -71,9 +72,6 @@ cards:
|
||||
- automation.lighting_temperature_adjust_on_start
|
||||
- automation.lighting_temperature_adjust_based_on_time
|
||||
- type: divider
|
||||
- automation.lighting_master_bedroom_toggle_lights_on_switch_single_click
|
||||
- automation.lighting_master_bedroom_toggle_ambient_lights_on_switch_double_click
|
||||
- type: divider
|
||||
- automation.lighting_kitchen_motion_on
|
||||
- automation.lighting_kitchen_motion_off
|
||||
- type: divider
|
||||
@@ -103,8 +101,6 @@ cards:
|
||||
- automation.youtube_download_latest_pds
|
||||
- automation.media_sonos_put_beam_in_night_mode
|
||||
- automation.media_sonos_put_beam_in_day_mode
|
||||
- type: divider
|
||||
- automation.music_master_bedroom_play_pause_on_switch_hold
|
||||
|
||||
- type: entities
|
||||
title: Notifications
|
||||
|
||||
@@ -72,6 +72,16 @@
|
||||
name: Ambient regular
|
||||
variables:
|
||||
scene_color_1: rgb(254, 255, 209)
|
||||
- type: custom:button-card
|
||||
template: [small, scene]
|
||||
entity: scene.bedroom_ambient_pink
|
||||
name: Ambient pink
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: script.apply_bedroom_pink
|
||||
variables:
|
||||
scene_color_1: rgb(255, 92, 38)
|
||||
scene_color_2: rgb(255, 0, 190)
|
||||
|
||||
- type: vertical-stack
|
||||
title: Controls
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
name: "Bedroom wall switch battery"
|
||||
state_topic: "z2m_deconz/bedroom_wall_switch"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
unit_of_measurement: "%"
|
||||
device_class: "battery"
|
||||
value_template: "{{ value_json.battery }}"
|
||||
- platform: mqtt
|
||||
name: "Bedroom wall switch LQI"
|
||||
state_topic: "z2m_deconz/bedroom_wall_switch"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
icon: "mdi:signal"
|
||||
unit_of_measurement: "lqi"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
|
||||
|
||||
automation:
|
||||
- alias: Bedroom · Aqara Switch
|
||||
use_blueprint:
|
||||
path: aqara_switch.yaml
|
||||
input:
|
||||
z2m_topic: "z2m_deconz/bedroom_wall_switch"
|
||||
click:
|
||||
- service: script.apply_bedroom_pink
|
||||
- service: script.music_play
|
||||
data:
|
||||
playlist: "Songs for a Romantic Evening"
|
||||
volume: 0.1
|
||||
shuffle: false
|
||||
- service: script.sonos_volume_10
|
||||
|
||||
double_click:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.bedroom_default
|
||||
|
||||
hold:
|
||||
- service: media_player.media_play_pause
|
||||
entity_id: media_player.master_bedroom
|
||||
@@ -1,73 +0,0 @@
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
name: "Bedroom wall switch click"
|
||||
state_topic: "z2m_deconz/bedroom_wall_switch"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
icon: "mdi:toggle-switch"
|
||||
value_template: "{{ value_json.click }}"
|
||||
- platform: mqtt
|
||||
name: "Bedroom wall switch battery"
|
||||
state_topic: "z2m_deconz/bedroom_wall_switch"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
unit_of_measurement: "%"
|
||||
device_class: "battery"
|
||||
value_template: "{{ value_json.battery }}"
|
||||
- platform: mqtt
|
||||
name: "Bedroom wall switch action"
|
||||
state_topic: "z2m_deconz/bedroom_wall_switch"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
icon: "mdi:gesture-double-tap"
|
||||
value_template: "{{ value_json.action }}"
|
||||
- platform: mqtt
|
||||
name: "Bedroom wall switch LQI"
|
||||
state_topic: "z2m_deconz/bedroom_wall_switch"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
icon: "mdi:signal"
|
||||
unit_of_measurement: "lqi"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
|
||||
|
||||
automation:
|
||||
- alias: Lighting · Master bedroom · Toggle lights on switch single click
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/bedroom_wall_switch"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_wall_switch_click
|
||||
state: 'single'
|
||||
action:
|
||||
- service: light.toggle
|
||||
data_template:
|
||||
entity_id: light.master_bedroom_main
|
||||
brightness_pct: >-
|
||||
|
||||
{% if is_state('input_select.house_mode', 'night') %}
|
||||
40
|
||||
{% else %}
|
||||
100
|
||||
{% endif %}
|
||||
|
||||
- alias: Lighting · Master bedroom · Toggle ambient lights on switch double click
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "z2m_deconz/bedroom_wall_switch"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sensor.bedroom_wall_switch_click
|
||||
state: 'double'
|
||||
action:
|
||||
- service: light.toggle
|
||||
entity_id: light.bedside
|
||||
data:
|
||||
brightness_pct: 100
|
||||
- service: script.bed_led_toggle
|
||||
|
||||
- alias: Music · Master bedroom · Play pause on switch hold
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.bedroom_wall_switch_action
|
||||
to: 'hold'
|
||||
action:
|
||||
- service: media_player.media_play_pause
|
||||
entity_id: media_player.master_bedroom
|
||||
@@ -18,9 +18,24 @@ script:
|
||||
data:
|
||||
rgb_color: [255, 0, 63]
|
||||
brightness: 153
|
||||
- delay: "00:00:03"
|
||||
- delay: "00:00:02"
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.bedroom_ambient_neon
|
||||
apply_bedroom_pink:
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
entity_id: light.bed_led
|
||||
- service: light.turn_on
|
||||
entity_id: light.master_bedroom_main
|
||||
- delay: "00:00:01"
|
||||
- service: light.turn_on
|
||||
entity_id: light.master_bedroom_main
|
||||
data:
|
||||
rgb_color: [255, 92, 38]
|
||||
brightness: 120
|
||||
- delay: "00:00:02"
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.bedroom_ambient_pink
|
||||
|
||||
scene:
|
||||
- name: Bedroom Ambient Neon
|
||||
@@ -35,6 +50,18 @@ scene:
|
||||
xy_color: [0.66, 0.28]
|
||||
brightness: 254
|
||||
|
||||
- name: Bedroom Ambient Pink
|
||||
icon: "mdi:weather-night"
|
||||
entities:
|
||||
light.bedside:
|
||||
state: "on"
|
||||
rgb_color: [255, 36, 145]
|
||||
brightness: 230
|
||||
light.bed_led:
|
||||
state: "on"
|
||||
xy_color: [0.66, 0.28]
|
||||
brightness: 254
|
||||
|
||||
- name: Bedroom Ambient Default
|
||||
icon: "mdi:weather-sunny"
|
||||
entities:
|
||||
|
||||
@@ -72,40 +72,30 @@ script:
|
||||
alias: Sonos · Volume 10
|
||||
sequence:
|
||||
- service: media_player.volume_set
|
||||
entity_id: media_player.master_bedroom
|
||||
entity_id:
|
||||
- media_player.master_bedroom
|
||||
- media_player.bathroom
|
||||
- media_player.kitchen
|
||||
data:
|
||||
volume_level: 0.1
|
||||
- service: media_player.volume_set
|
||||
entity_id: media_player.living_room
|
||||
data:
|
||||
volume_level: 0.2
|
||||
- service: media_player.volume_set
|
||||
entity_id: media_player.bathroom
|
||||
data:
|
||||
volume_level: 0.1
|
||||
- service: media_player.volume_set
|
||||
entity_id: media_player.kitchen
|
||||
data:
|
||||
volume_level: 0.1
|
||||
sonos_volume_20:
|
||||
alias: Sonos · Volume 20
|
||||
sequence:
|
||||
- service: media_player.volume_set
|
||||
entity_id: media_player.master_bedroom
|
||||
entity_id:
|
||||
- media_player.master_bedroom
|
||||
- media_player.bathroom
|
||||
- media_player.kitchen
|
||||
data:
|
||||
volume_level: 0.2
|
||||
- service: media_player.volume_set
|
||||
entity_id: media_player.living_room
|
||||
data:
|
||||
volume_level: 0.3
|
||||
- service: media_player.volume_set
|
||||
entity_id: media_player.bathroom
|
||||
data:
|
||||
volume_level: 0.2
|
||||
- service: media_player.volume_set
|
||||
entity_id: media_player.kitchen
|
||||
data:
|
||||
volume_level: 0.2
|
||||
|
||||
automation:
|
||||
- alias: Media · Sonos · Put Beam in night mode
|
||||
|
||||
Reference in New Issue
Block a user