mqtt: sensor: - name: "Bedside second 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 }}" - name: "Bedside second switch LQI" state_topic: "z2m_deconz/bedroom_wall_switch" availability_topic: "z2m_deconz/bridge/state" unit_of_measurement: "lqi" device_class: "signal_strength" value_template: "{{ value_json.linkquality }}" automation: - alias: Bedroom · Bedside Second Switch use_blueprint: path: aqara_switch.yaml input: z2m_topic: "z2m_deconz/bedroom_wall_switch" click: - service: light.toggle data_template: entity_id: >- {% if is_state('input_select.bedroom_mode', 'day') %} ['light.master_bedroom_main', 'light.bedside'] {% else %} light.bedside {% endif %} brightness_pct: 100 double_click: - service: media_player.media_play_pause entity_id: media_player.master_bedroom hold: - service: script.toggle_bedroom_mode