mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-13 19:54:42 +00:00
51 lines
1.7 KiB
YAML
51 lines
1.7 KiB
YAML
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_template:
|
|
brightness_pct: 10
|
|
color_temp: "{{ states('input_number.guest_bedroom_light_temp') }}"
|
|
default:
|
|
- service: light.toggle
|
|
entity_id: light.light_lohas_6
|
|
data_template:
|
|
brightness_pct: 100
|
|
color_temp: "{{ states('input_number.guest_bedroom_light_temp') }}"
|
|
|
|
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
|