Include Guest Bedroom in house mode

This commit is contained in:
2021-10-18 23:28:42 +03:00
parent af5e969c2b
commit c4e977b345
25 changed files with 241 additions and 119 deletions
@@ -0,0 +1,48 @@
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: Guest Bedroom · Aqara Switch
use_blueprint:
path: aqara_switch.yaml
input:
z2m_topic: "z2m_deconz/bedroom_wall_switch"
click:
- choose:
- conditions:
- condition: state
entity_id: input_select.guest_bedroom_mode
state: 'night'
sequence:
- service: light.toggle
entity_id: light.light_lohas_6
data:
brightness_pct: 10
default:
- service: light.toggle
entity_id: light.light_lohas_6
data:
brightness_pct: 100
double_click:
- service: light.toggle
entity_id: light.light_lohas_6
hold:
- service: script.guest_bedroom_bedside_confirm
- service: input_select.select_next
entity_id: input_select.guest_bedroom_mode