Switch to zigbee2mqtt auto discovery

This commit is contained in:
Georgi Gardev
2022-12-01 16:02:00 +02:00
parent c8b1404364
commit 94883087c2
51 changed files with 189 additions and 1804 deletions
+7 -7
View File
@@ -2,25 +2,25 @@ blueprint:
name: Aqara single switch name: Aqara single switch
domain: automation domain: automation
input: input:
z2m_topic: action_entity:
click: click:
default: [] default: []
double_click: double_click:
default: [] default: []
hold: hold:
default: [] default: []
mode: queued
trigger: trigger:
platform: mqtt platform: state
topic: !input z2m_topic entity_id: !input action_entity
action: action:
- choose: - choose:
- conditions: "{{ trigger.payload == 'single' }}" - conditions: "{{ trigger.to_state.state == 'single' }}"
sequence: !input click sequence: !input click
- conditions: "{{ trigger.payload == 'double' }}" - conditions: "{{ trigger.to_state.state == 'double' }}"
sequence: !input double_click sequence: !input double_click
- conditions: "{{ trigger.payload == 'hold' }}" - conditions: "{{ trigger.to_state.state == 'hold' }}"
sequence: !input hold sequence: !input hold
+1 -1
View File
@@ -28,7 +28,7 @@ action:
title: "🏠 *Presence Module · Arrival Detection*" title: "🏠 *Presence Module · Arrival Detection*"
message: >- message: >-
{{ name + "\'s device marked as home. Waiting for door to open!" }} {{ name + "\'s device marked as home. Waiting for door to open!" }}
- wait_template: "{{ is_state('binary_sensor.front_door', 'on') }}" - wait_template: "{{ is_state('binary_sensor.front_door_contact', 'on') }}"
continue_on_timeout: false continue_on_timeout: false
timeout: 00:15:00 timeout: 00:15:00
- service: input_boolean.turn_on - service: input_boolean.turn_on
+26 -99
View File
@@ -2,7 +2,6 @@ blueprint:
name: Oppo 6 button switch controls name: Oppo 6 button switch controls
domain: automation domain: automation
input: input:
opple_z2m_name:
action_sensor: action_sensor:
button_1_single: button_1_single:
default: [] default: []
@@ -55,150 +54,78 @@ blueprint:
mode: queued mode: queued
trigger: trigger:
platform: mqtt platform: state
topic: !input opple_z2m_name entity_id: !input action_sensor
action: action:
- choose: - choose:
- conditions: - conditions: "{{ trigger.to_state.state == 'button_1_single' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_1_single'
sequence: !input button_1_single sequence: !input button_1_single
- conditions: - conditions: "{{ trigger.to_state.state == 'button_1_double' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_1_double'
sequence: !input button_1_double sequence: !input button_1_double
- conditions: - conditions: "{{ trigger.to_state.state == 'button_1_triple' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_1_triple'
sequence: !input button_1_triple sequence: !input button_1_triple
- conditions: - conditions: "{{ trigger.to_state.state == 'button_1_release' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_1_release'
sequence: !input button_1_release sequence: !input button_1_release
- conditions: - conditions: "{{ trigger.to_state.state == 'button_2_single' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_2_single'
sequence: !input button_2_single sequence: !input button_2_single
- conditions: - conditions: "{{ trigger.to_state.state == 'button_2_double' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_2_double'
sequence: !input button_2_double sequence: !input button_2_double
- conditions: - conditions: "{{ trigger.to_state.state == 'button_2_triple' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_2_triple'
sequence: !input button_2_triple sequence: !input button_2_triple
- conditions: - conditions: "{{ trigger.to_state.state == 'button_2_release' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_2_release'
sequence: !input button_2_release sequence: !input button_2_release
- conditions: - conditions: "{{ trigger.to_state.state == 'button_3_single' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_3_single'
sequence: !input button_3_single sequence: !input button_3_single
- conditions: - conditions: "{{ trigger.to_state.state == 'button_3_double' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_3_double'
sequence: !input button_3_double sequence: !input button_3_double
- conditions: - conditions: "{{ trigger.to_state.state == 'button_3_triple' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_3_triple'
sequence: !input button_3_triple sequence: !input button_3_triple
- conditions: - conditions: "{{ trigger.to_state.state == 'button_3_release' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_3_release'
sequence: !input button_3_release sequence: !input button_3_release
- conditions: - conditions: "{{ trigger.to_state.state == 'button_4_single' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_4_single'
sequence: !input button_4_single sequence: !input button_4_single
- conditions: - conditions: "{{ trigger.to_state.state == 'button_4_double' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_4_double'
sequence: !input button_4_double sequence: !input button_4_double
- conditions: - conditions: "{{ trigger.to_state.state == 'button_4_triple' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_4_triple'
sequence: !input button_4_triple sequence: !input button_4_triple
- conditions: - conditions: "{{ trigger.to_state.state == 'button_4_release' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_4_release'
sequence: !input button_4_release sequence: !input button_4_release
- conditions: - conditions: "{{ trigger.to_state.state == 'button_5_single' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_5_single'
sequence: !input button_5_single sequence: !input button_5_single
- conditions: - conditions: "{{ trigger.to_state.state == 'button_5_double' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_5_double'
sequence: !input button_5_double sequence: !input button_5_double
- conditions: - conditions: "{{ trigger.to_state.state == 'button_5_triple' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_5_triple'
sequence: !input button_5_triple sequence: !input button_5_triple
- conditions: - conditions: "{{ trigger.to_state.state == 'button_5_release' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_5_release'
sequence: !input button_5_release sequence: !input button_5_release
- conditions: - conditions: "{{ trigger.to_state.state == 'button_6_single' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_6_single'
sequence: !input button_6_single sequence: !input button_6_single
- conditions: - conditions: "{{ trigger.to_state.state == 'button_6_double' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_6_double'
sequence: !input button_6_double sequence: !input button_6_double
- conditions: - conditions: "{{ trigger.to_state.state == 'button_6_triple' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_6_triple'
sequence: !input button_6_triple sequence: !input button_6_triple
- conditions: - conditions: "{{ trigger.to_state.state == 'button_6_release' }}"
- condition: state
entity_id: !input action_sensor
state: 'button_6_release'
sequence: !input button_6_release sequence: !input button_6_release
+2 -2
View File
@@ -52,10 +52,10 @@ views:
entity: binary_sensor.kitchen_motion_occupancy entity: binary_sensor.kitchen_motion_occupancy
- type: custom:button-card - type: custom:button-card
template: v3_badge_icon template: v3_badge_icon
entity: binary_sensor.kitchen_window entity: binary_sensor.kitchen_window_contact
- type: custom:button-card - type: custom:button-card
template: v3_badge_icon template: v3_badge_icon
entity: binary_sensor.kitchen_door entity: binary_sensor.kitchen_door_contact
- type: custom:decluttering-card - type: custom:decluttering-card
template: v3_section_title template: v3_section_title
+2 -2
View File
@@ -75,8 +75,8 @@ cards:
- type: custom:decluttering-card - type: custom:decluttering-card
template: light_with_update_and_lqi template: light_with_update_and_lqi
variables: variables:
- light: light.pc - light: light.hue_ambiance_7
- lqi: sensor.pc_lqi - lqi: sensor.hue_ambiance_7_linkquality
- update: binary_sensor.pc_update_available - update: binary_sensor.pc_update_available
- light.living_room_ambient - light.living_room_ambient
- light.living_room_ambient_main - light.living_room_ambient_main
+6 -6
View File
@@ -45,25 +45,25 @@ cards:
cards: cards:
- type: custom:button-card - type: custom:button-card
template: v3_button template: v3_button
entity: binary_sensor.living_room_right_window entity: binary_sensor.living_room_right_window_contact
name: Living room name: Living room
- type: custom:button-card - type: custom:button-card
template: v3_button template: v3_button
entity: binary_sensor.bedroom_left_window entity: binary_sensor.bedroom_left_window_contact
name: Bedroom left name: Bedroom left
- type: custom:button-card - type: custom:button-card
template: v3_button template: v3_button
entity: binary_sensor.bedroom_right_window entity: binary_sensor.bedroom_right_window_contact
name: Bedroom right name: Bedroom right
- type: custom:button-card - type: custom:button-card
template: v3_button template: v3_button
entity: binary_sensor.kitchen_window entity: binary_sensor.kitchen_window_contact
name: Kitchen name: Kitchen
- type: horizontal-stack - type: horizontal-stack
cards: cards:
- type: custom:button-card - type: custom:button-card
template: v3_button template: v3_button
entity: binary_sensor.front_door entity: binary_sensor.front_door_contact
- type: custom:button-card - type: custom:button-card
template: v3_button template: v3_button
entity: binary_sensor.bedroom_door entity: binary_sensor.bedroom_door_contact
@@ -84,12 +84,10 @@ cards:
- automation.lighting_hallway_motion_on - automation.lighting_hallway_motion_on
- automation.lighting_hallway_motion_off - automation.lighting_hallway_motion_off
- type: divider - type: divider
- automation.lighting_sync_zigbee_states_on_start_up - automation.lighting_sync_tasmota_states_on_start_up
- type: divider - type: divider
- automation.trust_remote_guest_bedroom - automation.trust_remote_guest_bedroom
- automation.trust_remote_dimming - automation.trust_remote_dimming
- automation.trust_remote_turn_on
- automation.trust_remote_turn_off
- type: entities - type: entities
title: Media title: Media
+24 -25
View File
@@ -88,13 +88,13 @@ cards:
- type: custom:battery-entity-row - type: custom:battery-entity-row
entity: sensor.bedside_switch_battery entity: sensor.bedside_switch_battery
- type: custom:battery-entity-row - type: custom:battery-entity-row
entity: sensor.bedside_second_switch_battery entity: sensor.bedroom_wall_switch_battery
- type: custom:battery-entity-row - type: custom:battery-entity-row
entity: sensor.bathroom_switch_battery entity: sensor.bathroom_switch_battery
- type: custom:battery-entity-row - type: custom:battery-entity-row
entity: sensor.living_room_opple_battery entity: sensor.opple_2_battery
- type: custom:battery-entity-row - type: custom:battery-entity-row
entity: sensor.bedroom_opple_battery entity: sensor.opple_1_battery
- type: custom:battery-entity-row - type: custom:battery-entity-row
entity: sensor.living_room_battery_level entity: sensor.living_room_battery_level
@@ -103,32 +103,31 @@ cards:
- type: entities - type: entities
title: Zigbee2MQTT link quality title: Zigbee2MQTT link quality
entities: entities:
- sensor.living_room_opple_lqi - sensor.opple_2_linkquality
- sensor.desk_switch_lqi - sensor.desk_switch_linkquality
- sensor.living_room_right_window_lqi - sensor.living_room_right_window_linkquality
- sensor.aqara_tvoc_lqi - sensor.aqara_tvoc_linkquality
- type: divider - type: divider
- sensor.bedside_switch_lqi - sensor.bedside_switch_linkquality
- sensor.bedside_second_switch_lqi - sensor.bedroom_wall_switch_linkquality
- sensor.bedroom_opple_lqi - sensor.opple_1_linkquality
- sensor.bedroom_door_lqi - sensor.bedroom_door_linkquality
- sensor.bedroom_left_window_lqi - sensor.bedroom_left_window_linkquality
- sensor.bedroom_right_window_lqi - sensor.bedroom_right_window_linkquality
- sensor.bedroom_weather_lqi - sensor.bedroom_weather_linkquality
- type: divider - type: divider
- sensor.kitchen_window_lqi - sensor.kitchen_window_linkquality
- sensor.kitchen_weather_lqi - sensor.kitchen_weather_linkquality
- sensor.kitchen_motion_lqi - sensor.kitchen_motion_linkquality
- type: divider - type: divider
- sensor.bathroom_weather_lqi - sensor.bathroom_weather_linkquality
- sensor.bathroom_switch_lqi - sensor.bathroom_switch_linkquality
- sensor.front_door_lqi - sensor.front_door_linkquality
- sensor.hallway_weather_lqi - sensor.hallway_weather_linkquality
- sensor.hallway_motion_lqi - sensor.hallway_motion_linkquality
- sensor.hallway_motion_2_lqi - sensor.hallway_motion_2_linkquality
- type: divider - type: divider
- sensor.guest_bedroom_weather_lqi - sensor.guest_bedroom_weather_linkquality
- sensor.router_1_lqi
- type: entities - type: entities
entities: entities:
@@ -24,7 +24,7 @@
conditions: conditions:
- entity: binary_sensor.floorplan_night_mode - entity: binary_sensor.floorplan_night_mode
state: "on" state: "on"
- entity: light.pc - entity: light.hue_ambiance_7
state: "on" state: "on"
- entity: light.living_room_main - entity: light.living_room_main
state: "off" state: "off"
@@ -42,7 +42,7 @@
conditions: conditions:
- entity: binary_sensor.floorplan_night_mode - entity: binary_sensor.floorplan_night_mode
state: "on" state: "on"
- entity: light.pc - entity: light.hue_ambiance_7
state: "off" state: "off"
- entity: light.living_room_main - entity: light.living_room_main
state: "on" state: "on"
@@ -60,7 +60,7 @@
conditions: conditions:
- entity: binary_sensor.floorplan_night_mode - entity: binary_sensor.floorplan_night_mode
state: "on" state: "on"
- entity: light.pc - entity: light.hue_ambiance_7
state: "on" state: "on"
- entity: light.living_room_main - entity: light.living_room_main
state: "on" state: "on"
@@ -1,7 +1,7 @@
- type: custom:decluttering-card - type: custom:decluttering-card
template: floorplan_state_icon template: floorplan_state_icon
variables: variables:
- entity: light.pc - entity: light.hue_ambiance_7
- top: 69.8% - top: 69.8%
- left: 77.8% - left: 77.8%
@@ -233,12 +233,12 @@
# Living room window # Living room window
- type: conditional - type: conditional
conditions: conditions:
- entity: binary_sensor.living_room_right_window - entity: binary_sensor.living_room_right_window_contact
state: "on" state: "on"
elements: elements:
- type: image - type: image
image: /local/images/floorplan/transparent.png image: /local/images/floorplan/transparent.png
entity: binary_sensor.living_room_right_window entity: binary_sensor.living_room_right_window_contact
style: style:
width: 7.8% width: 7.8%
height: 8.4% height: 8.4%
@@ -251,12 +251,12 @@
# Master bedroom window # Master bedroom window
- type: conditional - type: conditional
conditions: conditions:
- entity: binary_sensor.bedroom_right_window - entity: binary_sensor.bedroom_right_window_contact
state: "on" state: "on"
elements: elements:
- type: image - type: image
image: /local/images/floorplan/transparent.png image: /local/images/floorplan/transparent.png
entity: binary_sensor.bedroom_right_window entity: binary_sensor.bedroom_right_window_contact
style: style:
width: 7.5% width: 7.5%
height: 8.2% height: 8.2%
@@ -205,7 +205,7 @@ card:
name: Main name: Main
- type: custom:button-card - type: custom:button-card
template: v3_tablet_button template: v3_tablet_button
entity: light.pc entity: light.hue_ambiance_7
- type: custom:button-card - type: custom:button-card
template: v3_tablet_button template: v3_tablet_button
entity: light.living_room_ambient entity: light.living_room_ambient
@@ -202,7 +202,7 @@ card:
name: Main name: Main
- type: custom:button-card - type: custom:button-card
template: v3_tablet_button template: v3_tablet_button
entity: light.pc entity: light.hue_ambiance_7
- type: custom:button-card - type: custom:button-card
template: v3_tablet_button template: v3_tablet_button
entity: light.living_room_ambient entity: light.living_room_ambient
@@ -45,13 +45,13 @@
cards: cards:
- type: custom:button-card - type: custom:button-card
template: v3_badge_icon template: v3_badge_icon
entity: binary_sensor.bedroom_left_window entity: binary_sensor.bedroom_left_window_contact
- type: custom:button-card - type: custom:button-card
template: v3_badge_icon template: v3_badge_icon
entity: binary_sensor.bedroom_right_window entity: binary_sensor.bedroom_right_window_contact
- type: custom:button-card - type: custom:button-card
template: v3_badge_icon template: v3_badge_icon
entity: binary_sensor.bedroom_door entity: binary_sensor.bedroom_door_contact
- type: custom:decluttering-card - type: custom:decluttering-card
template: v3_section_title template: v3_section_title
@@ -47,7 +47,7 @@
entity: binary_sensor.hallway_motion_2_occupancy entity: binary_sensor.hallway_motion_2_occupancy
- type: custom:button-card - type: custom:button-card
template: v3_badge_icon template: v3_badge_icon
entity: binary_sensor.front_door entity: binary_sensor.front_door_contact
- type: custom:decluttering-card - type: custom:decluttering-card
template: v3_section_title template: v3_section_title
@@ -41,10 +41,10 @@
cards: cards:
- type: custom:button-card - type: custom:button-card
template: v3_badge_icon template: v3_badge_icon
entity: binary_sensor.kitchen_window entity: binary_sensor.kitchen_window_contact
- type: custom:button-card - type: custom:button-card
template: v3_badge_icon template: v3_badge_icon
entity: binary_sensor.kitchen_door entity: binary_sensor.kitchen_door_contact
- type: custom:decluttering-card - type: custom:decluttering-card
template: v3_section_title template: v3_section_title
@@ -59,11 +59,11 @@
name: All name: All
- type: custom:button-card - type: custom:button-card
template: v3_button_light template: v3_button_light
entity: light.kitchen_main entity: light.light_kitchen_main
name: Main name: Main
- type: custom:button-card - type: custom:button-card
template: v3_button_light template: v3_button_light
entity: light.kitchen_secondary entity: light.light_kitchen_secondary
name: Secondary name: Secondary
- type: vertical-stack - type: vertical-stack
@@ -56,7 +56,7 @@
entity: binary_sensor.toshiba_ac_conditions_met entity: binary_sensor.toshiba_ac_conditions_met
- type: custom:button-card - type: custom:button-card
template: v3_badge_icon template: v3_badge_icon
entity: binary_sensor.living_room_right_window entity: binary_sensor.living_room_right_window_contact
- type: custom:decluttering-card - type: custom:decluttering-card
template: v3_section_title template: v3_section_title
@@ -96,7 +96,7 @@
name: Main name: Main
- type: custom:button-card - type: custom:button-card
template: v3_button_light template: v3_button_light
entity: light.pc entity: light.hue_ambiance_7
name: PC name: PC
- type: horizontal-stack - type: horizontal-stack
cards: cards:
+6 -6
View File
@@ -279,13 +279,13 @@ cards:
cards: cards:
- type: custom:button-card - type: custom:button-card
template: [v3_button, v3_popup_button] template: [v3_button, v3_popup_button]
entity: binary_sensor.front_door entity: binary_sensor.front_door_contact
styles: styles:
card: card:
- margin-left: 8px - margin-left: 8px
- type: custom:button-card - type: custom:button-card
template: [v3_button, v3_popup_button] template: [v3_button, v3_popup_button]
entity: binary_sensor.bedroom_door entity: binary_sensor.bedroom_door_contact
name: Bedroom name: Bedroom
- type: custom:popup-card - type: custom:popup-card
@@ -298,24 +298,24 @@ cards:
cards: cards:
- type: custom:button-card - type: custom:button-card
template: [v3_button, v3_popup_button] template: [v3_button, v3_popup_button]
entity: binary_sensor.living_room_right_window entity: binary_sensor.living_room_right_window_contact
name: Living Room name: Living Room
styles: styles:
card: card:
- margin-left: 8px - margin-left: 8px
- type: custom:button-card - type: custom:button-card
template: [v3_button, v3_popup_button] template: [v3_button, v3_popup_button]
entity: binary_sensor.bedroom_left_window entity: binary_sensor.bedroom_left_window_contact
name: Bedroom Left name: Bedroom Left
- type: custom:button-card - type: custom:button-card
template: [v3_button, v3_popup_button] template: [v3_button, v3_popup_button]
entity: binary_sensor.bedroom_right_window entity: binary_sensor.bedroom_right_window_contact
name: Bedroom Right name: Bedroom Right
- type: horizontal-stack - type: horizontal-stack
cards: cards:
- type: custom:button-card - type: custom:button-card
template: [v3_button, v3_popup_button] template: [v3_button, v3_popup_button]
entity: binary_sensor.kitchen_window entity: binary_sensor.kitchen_window_contact
name: Kitchen name: Kitchen
styles: styles:
card: card:
+1 -16
View File
@@ -6,27 +6,12 @@ input_number:
step: 0.05 step: 0.05
icon: mdi:speaker icon: mdi:speaker
mqtt:
sensor:
- name: "Bathroom switch battery"
state_topic: "z2m_deconz/bathroom_switch"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Bathroom switch LQI"
state_topic: "z2m_deconz/bathroom_switch"
availability_topic: "z2m_deconz/bridge/state"
device_class: "signal_strength"
unit_of_measurement: "lqi"
value_template: "{{ value_json.linkquality }}"
automation: automation:
- alias: Bathroom · Switch - alias: Bathroom · Switch
use_blueprint: use_blueprint:
path: aqara_switch.yaml path: aqara_switch.yaml
input: input:
z2m_topic: "z2m_deconz/bathroom_switch/action" action_entity: sensor.bathroom_switch_action
click: click:
- service: media_player.volume_set - service: media_player.volume_set
entity_id: media_player.bathroom entity_id: media_player.bathroom
+2 -21
View File
@@ -1,29 +1,10 @@
mqtt:
sensor:
- name: "Bedroom Opple action"
state_topic: "z2m_deconz/opple_1/action"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:gesture-double-tap"
- name: "Bedroom Opple battery"
state_topic: "z2m_deconz/opple_1"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Bedroom Opple LQI"
state_topic: "z2m_deconz/opple_1"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
automation: automation:
- alias: Bedroom · Opple - alias: Bedroom · Opple
id: bedroom_opple
use_blueprint: use_blueprint:
path: oppo_6_btn_switch.yaml path: oppo_6_btn_switch.yaml
input: input:
opple_z2m_name: "z2m_deconz/opple_1" action_sensor: sensor.opple_1_action
action_sensor: sensor.bedroom_opple_action
button_1_single: button_1_single:
- service: light.turn_off - service: light.turn_off
+1 -16
View File
@@ -1,24 +1,9 @@
mqtt:
sensor:
- name: "Bedside switch battery"
state_topic: "z2m_deconz/bedside_switch"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Bedside switch LQI"
state_topic: "z2m_deconz/bedside_switch"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
automation: automation:
- alias: Bedroom · Bedside Switch - alias: Bedroom · Bedside Switch
use_blueprint: use_blueprint:
path: aqara_switch.yaml path: aqara_switch.yaml
input: input:
z2m_topic: "z2m_deconz/bedside_switch/action" action_entity: sensor.bedside_switch_action
click: click:
- service: light.toggle - service: light.toggle
data_template: data_template:
+1 -17
View File
@@ -1,25 +1,9 @@
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: automation:
- alias: Bedroom · Bedside Second Switch - alias: Bedroom · Bedside Second Switch
use_blueprint: use_blueprint:
path: aqara_switch.yaml path: aqara_switch.yaml
input: input:
z2m_topic: "z2m_deconz/bedroom_wall_switch/action" action_entity: sensor.bedroom_wall_switch_action
click: click:
- service: light.toggle - service: light.toggle
data_template: data_template:
@@ -1,53 +0,0 @@
#############################
# Moved to bedside_switch_2 #
#############################
# mqtt:
# sensor:
# - 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 }}"
# - name: "Bedroom wall 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: Guest Bedroom · Aqara Switch
# use_blueprint:
# path: aqara_switch.yaml
# input:
# z2m_topic: "z2m_deconz/bedroom_wall_switch/action"
# 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
+1 -4
View File
@@ -36,7 +36,7 @@ automation:
message: "Waiting for front door to open. Have a great time!" message: "Waiting for front door to open. Have a great time!"
- wait_for_trigger: - wait_for_trigger:
- platform: state - platform: state
entity_id: binary_sensor.front_door entity_id: binary_sensor.front_door_contact
to: "on" to: "on"
timeout: timeout:
minutes: 5 minutes: 5
@@ -44,6 +44,3 @@ automation:
- service: script.say - service: script.say
data: data:
message: "Goodbye!" message: "Goodbye!"
# TODO: add conditions
# - service: input_boolean.turn_off
# entity_id: input_boolean.georgi_home
+1 -17
View File
@@ -1,25 +1,9 @@
mqtt:
sensor:
- name: "Desk switch battery"
state_topic: "z2m_deconz/desk_switch"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Desk switch LQI"
state_topic: "z2m_deconz/desk_switch"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
automation: automation:
- alias: Living room · Desk switch - alias: Living room · Desk switch
use_blueprint: use_blueprint:
path: aqara_switch.yaml path: aqara_switch.yaml
input: input:
z2m_topic: "z2m_deconz/desk_switch/action" action_entity: sensor.desk_switch_action
click: click:
- service: light.toggle - service: light.toggle
data_template: data_template:
@@ -1,29 +1,10 @@
mqtt:
sensor:
- name: "Living room Opple action"
state_topic: "z2m_deconz/opple_2/action"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:gesture-double-tap"
- name: "Living room Opple battery"
state_topic: "z2m_deconz/opple_2"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Living room Opple LQI"
state_topic: "z2m_deconz/opple_2"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
automation: automation:
- alias: Living room · Opple - alias: Living room · Opple
id: living_room_opple
use_blueprint: use_blueprint:
path: oppo_6_btn_switch.yaml path: oppo_6_btn_switch.yaml
input: input:
opple_z2m_name: "z2m_deconz/opple_2" action_sensor: sensor.opple_2_action
action_sensor: sensor.living_room_opple_action
button_1_single: button_1_single:
- service: light.turn_off - service: light.turn_off
+6 -6
View File
@@ -73,8 +73,8 @@ template:
{% set temp_matching = states('sensor.multisensor_6_temperature')|float >= states('input_number.toshiba_trigger_temp')|float %} {% set temp_matching = states('sensor.multisensor_6_temperature')|float >= states('input_number.toshiba_trigger_temp')|float %}
{% set outside_temp_high = states('sensor.dark_sky_apparent_temperature')|float + 2 >= states('input_number.toshiba_trigger_temp')|float %} {% set outside_temp_high = states('sensor.dark_sky_apparent_temperature')|float + 2 >= states('input_number.toshiba_trigger_temp')|float %}
{% set someone_home = is_state('binary_sensor.someone_home', 'on') %} {% set someone_home = is_state('binary_sensor.someone_home', 'on') %}
{% set bedroom_ready = is_state('group.bedroom_windows', 'off') or is_state('binary_sensor.bedroom_door', 'off') %} {% set bedroom_ready = is_state('group.bedroom_windows', 'off') or is_state('binary_sensor.bedroom_door_contact', 'off') %}
{% set kitchen_ready = is_state('binary_sensor.kitchen_window', 'off') or is_state('binary_sensor.kitchen_door', 'off') %} {% set kitchen_ready = is_state('binary_sensor.kitchen_window_contact', 'off') or is_state('binary_sensor.kitchen_door_contact', 'off') %}
{% set ac_off = is_state('climate.toshiba_ac', 'off') %} {% set ac_off = is_state('climate.toshiba_ac', 'off') %}
{{ temp_matching and outside_temp_high and someone_home and bedroom_ready and kitchen_ready and ac_off }} {{ temp_matching and outside_temp_high and someone_home and bedroom_ready and kitchen_ready and ac_off }}
@@ -157,10 +157,10 @@ automation:
for: "00:05:00" for: "00:05:00"
- platform: state - platform: state
entity_id: entity_id:
- binary_sensor.living_room_right_window - binary_sensor.living_room_right_window_contact
- group.bedroom_windows - group.bedroom_windows
- binary_sensor.kitchen_window - binary_sensor.kitchen_window_contact
- binary_sensor.kitchen_door - binary_sensor.kitchen_door_contact
from: "on" from: "on"
to: "off" to: "off"
action: action:
@@ -178,7 +178,7 @@ automation:
- platform: state - platform: state
entity_id: entity_id:
- binary_sensor.living_room_right_window - binary_sensor.living_room_right_window_contact
- group.bedroom_windows - group.bedroom_windows
from: "off" from: "off"
to: "on" to: "on"
+6 -76
View File
@@ -1,41 +1,22 @@
mqtt:
sensor:
- name: "Trust remote action"
state_topic: "z2m_deconz/trust_remote"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:gesture-double-tap"
value_template: "{{ value_json.action }}"
- name: "Trust remote group"
state_topic: "z2m_deconz/trust_remote"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:lightbulb-group"
value_template: "{{ value_json.action_group }}"
- name: "Trust remote LQI"
state_topic: "z2m_deconz/trust_remote"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
automation: automation:
- alias: Trust remote · Guest bedroom - alias: Trust remote · Guest bedroom
trigger: trigger:
- platform: mqtt - platform: state
topic: z2m_deconz/trust_remote entity_id: sensor.trust_remote_action
action: action:
- choose: - choose:
- conditions: "{{ trigger.payload_json.action == 'up-press' }}" - conditions: "{{ trigger.to_state.state == 'up-press' }}"
sequence: sequence:
- service: light.turn_on - service: light.turn_on
entity_id: light.tradfri_large entity_id: light.tradfri_large
data_template: data_template:
brightness_pct: "{{ is_state('input_select.guest_bedroom_mode', 'day') | iif(100, 10) }}" brightness_pct: "{{ is_state('input_select.guest_bedroom_mode', 'day') | iif(100, 10) }}"
color_temp: "{{ states('input_number.guest_bedroom_light_temp') }}" color_temp: "{{ states('input_number.guest_bedroom_light_temp') }}"
- conditions: "{{ trigger.payload_json.action == 'down-press' }}" - conditions: "{{ trigger.to_state.state == 'down-press' }}"
sequence: sequence:
- service: light.turn_off - service: light.turn_off
entity_id: light.tradfri_large entity_id: light.tradfri_large
- conditions: "{{ trigger.payload_json.action == 'on' or trigger.payload_json.action == 'off' }}" - conditions: "{{ trigger.to_state.state == 'on' or trigger.to_state.state == 'off' }}"
sequence: sequence:
- service: script.guest_bedroom_bedside_confirm - service: script.guest_bedroom_bedside_confirm
- service: input_select.select_next - service: input_select.select_next
@@ -59,7 +40,7 @@ automation:
{% elif groupId == 0 %} {% elif groupId == 0 %}
{% set entityId = 'light.living_room_main' %} {% set entityId = 'light.living_room_main' %}
{% elif groupId == 1 %} {% elif groupId == 1 %}
{% set entityId = 'light.pc' %} {% set entityId = 'light.hue_ambiance_7' %}
{% elif groupId == 2 %} {% elif groupId == 2 %}
{% set entityId = 'light.living_room_ambient' %} {% set entityId = 'light.living_room_ambient' %}
{% elif groupId == 3 %} {% elif groupId == 3 %}
@@ -76,54 +57,3 @@ automation:
{% else %} {% else %}
-20 -20
{% endif %} {% endif %}
- alias: Trust remote · Turn on
trigger:
- platform: mqtt
topic: z2m_deconz/trust_remote
condition: "{{ trigger.payload_json.action == 'on' }}"
action:
- service: light.turn_on
data_template:
entity_id: >-
{% set groupId = (trigger.payload_json.action_group % 10) %}
{% if groupId == 5 %}
light.living_room
{% elif groupId == 0 %}
light.living_room_main
{% elif groupId == 1 %}
light.pc
{% elif groupId == 2 %}
light.living_room_ambient
{% elif groupId == 3 %}
light.living_room_ambient_main
{% elif groupId == 4 %}
light.light_lohas_2
{% endif %}
brightness_pct: 100
- alias: Trust remote · Turn off
trigger:
- platform: mqtt
topic: z2m_deconz/trust_remote
condition: "{{ trigger.payload_json.action == 'off' }}"
action:
- service: light.turn_off
data_template:
entity_id: >-
{% set groupId = (trigger.payload_json.action_group % 10) %}
{% if groupId == 5 %}
{% set entityId = 'light.living_room' %}
{% elif groupId == 0 %}
{% set entityId = 'light.living_room_main' %}
{% elif groupId == 1 %}
{% set entityId = 'light.pc' %}
{% elif groupId == 2 %}
{% set entityId = 'light.living_room_ambient' %}
{% elif groupId == 3 %}
{% set entityId = 'light.living_room_ambient_main' %}
{% elif groupId == 4 %}
{% set entityId = 'light.light_lohas_2' %}
{% endif %}
{{ entityId }}
+2 -2
View File
@@ -23,7 +23,7 @@ automation:
property_key: "001" property_key: "001"
action: action:
- service: light.toggle - service: light.toggle
entity_id: light.pc entity_id: light.hue_ambiance_7
- alias: Wallmote · Living room · 2 · Tap · Toggle Music - alias: Wallmote · Living room · 2 · Tap · Toggle Music
trigger: trigger:
@@ -62,7 +62,7 @@ automation:
- service: light.toggle - service: light.toggle
entity_id: entity_id:
- light.living_room_main - light.living_room_main
- light.pc - light.hue_ambiance_7
- alias: Wallmote · Living room · 3 · Hold · Toggle Ambient lights - alias: Wallmote · Living room · 3 · Hold · Toggle Ambient lights
trigger: trigger:
+6 -6
View File
@@ -21,9 +21,9 @@ alexa:
- media_player.living_room - media_player.living_room
- media_player.bathroom - media_player.bathroom
- binary_sensor.front_door - binary_sensor.front_door_contact
- binary_sensor.living_room_right_window - binary_sensor.living_room_right_window_contact
- binary_sensor.bedroom_right_window - binary_sensor.bedroom_right_window_contact
- sensor.bedroom_weather_temperature - sensor.bedroom_weather_temperature
- sensor.bedroom_weather_humidity - sensor.bedroom_weather_humidity
@@ -60,11 +60,11 @@ alexa:
name: "Living room Sonos" name: "Living room Sonos"
media_player.bathroom: media_player.bathroom:
name: "Bathroom Sonos" name: "Bathroom Sonos"
binary_sensor.front_door: binary_sensor.front_door_contact:
name: "Front door" name: "Front door"
binary_sensor.living_room_right_window: binary_sensor.living_room_right_window_contact:
name: "Living room window" name: "Living room window"
binary_sensor.bedroom_right_window: binary_sensor.bedroom_right_window_contact:
name: "Bedroom window" name: "Bedroom window"
sensor.bedroom_weather_temperature: sensor.bedroom_weather_temperature:
name: "Bedroom temperature" name: "Bedroom temperature"
+8 -8
View File
@@ -16,10 +16,10 @@ automation:
trigger: trigger:
platform: state platform: state
entity_id: entity_id:
- binary_sensor.kitchen_window - binary_sensor.kitchen_window_contact
- binary_sensor.living_room_right_window - binary_sensor.living_room_right_window_contact
- binary_sensor.bedroom_left_window - binary_sensor.bedroom_left_window_contact
- binary_sensor.bedroom_right_window - binary_sensor.bedroom_right_window_contact
from: "off" from: "off"
to: "on" to: "on"
condition: condition:
@@ -40,10 +40,10 @@ automation:
condition: condition:
- condition: state - condition: state
entity_id: entity_id:
- binary_sensor.kitchen_window - binary_sensor.kitchen_window_contact
- binary_sensor.living_room_right_window - binary_sensor.living_room_right_window_contact
- binary_sensor.bedroom_left_window - binary_sensor.bedroom_left_window_contact
- binary_sensor.bedroom_right_window - binary_sensor.bedroom_right_window_contact
state: "on" state: "on"
action: action:
- service: script.say - service: script.say
@@ -18,229 +18,3 @@ sensor:
- sensor.kitchen_weather_humidity - sensor.kitchen_weather_humidity
- sensor.hallway_weather_humidity - sensor.hallway_weather_humidity
- sensor.guest_bedroom_weather_humidity - sensor.guest_bedroom_weather_humidity
mqtt:
sensor:
# Bedroom weather sensor
- name: "Bedroom weather temperature"
state_topic: "z2m_deconz/bedroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "°C"
device_class: "temperature"
value_template: "{{ value_json.temperature }}"
- name: "Bedroom weather humidity"
state_topic: "z2m_deconz/bedroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "humidity"
value_template: "{{ value_json.humidity }}"
- name: "Bedroom weather pressure"
state_topic: "z2m_deconz/bedroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "hPa"
device_class: "pressure"
value_template: "{{ value_json.pressure }}"
- name: "Bedroom weather battery"
state_topic: "z2m_deconz/bedroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Bedroom weather LQI"
state_topic: "z2m_deconz/bedroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
# Kitchen weather sensor
- name: "Kitchen weather temperature"
state_topic: "z2m_deconz/kitchen_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "°C"
device_class: "temperature"
value_template: "{{ value_json.temperature }}"
- name: "Kitchen weather humidity"
state_topic: "z2m_deconz/kitchen_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "humidity"
value_template: "{{ value_json.humidity }}"
- name: "Kitchen weather pressure"
state_topic: "z2m_deconz/kitchen_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "hPa"
device_class: "pressure"
value_template: "{{ value_json.pressure }}"
- name: "Kitchen weather battery"
state_topic: "z2m_deconz/kitchen_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Kitchen weather LQI"
state_topic: "z2m_deconz/kitchen_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
# Bathroom weather sensor
- name: "Bathroom weather temperature"
state_topic: "z2m_deconz/bathroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "°C"
device_class: "temperature"
value_template: "{{ value_json.temperature }}"
- name: "Bathroom weather humidity"
state_topic: "z2m_deconz/bathroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "humidity"
value_template: "{{ value_json.humidity }}"
- name: "Bathroom weather pressure"
state_topic: "z2m_deconz/bathroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "hPa"
device_class: "pressure"
value_template: "{{ value_json.pressure }}"
- name: "Bathroom weather battery"
state_topic: "z2m_deconz/bathroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Bathroom weather LQI"
state_topic: "z2m_deconz/bathroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
# Hallway weather sensor
- name: "Hallway weather temperature"
state_topic: "z2m_deconz/hallway_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "°C"
device_class: "temperature"
value_template: "{{ value_json.temperature }}"
- name: "Hallway weather humidity"
state_topic: "z2m_deconz/hallway_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "humidity"
value_template: "{{ value_json.humidity }}"
- name: "Hallway weather pressure"
state_topic: "z2m_deconz/hallway_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "hPa"
device_class: "pressure"
value_template: "{{ value_json.pressure }}"
- name: "Hallway weather battery"
state_topic: "z2m_deconz/hallway_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Hallway weather LQI"
state_topic: "z2m_deconz/hallway_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
# Guest bedroom weather sensor
- name: "Guest bedroom weather temperature"
state_topic: "z2m_deconz/guest_bedroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "°C"
device_class: "temperature"
value_template: "{{ value_json.temperature }}"
- name: "Guest bedroom weather humidity"
state_topic: "z2m_deconz/guest_bedroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "humidity"
value_template: "{{ value_json.humidity }}"
- name: "Guest bedroom weather pressure"
state_topic: "z2m_deconz/guest_bedroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "hPa"
device_class: "pressure"
value_template: "{{ value_json.pressure }}"
- name: "Guest bedroom weather battery"
state_topic: "z2m_deconz/guest_bedroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Guest bedroom weather LQI"
state_topic: "z2m_deconz/guest_bedroom_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
# Terrarium weather sensor
- name: "Terrarium weather temperature"
state_topic: "z2m_deconz/terrarium_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "°C"
device_class: "temperature"
value_template: "{{ value_json.temperature }}"
- name: "Terrarium weather humidity"
state_topic: "z2m_deconz/terrarium_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "humidity"
value_template: "{{ value_json.humidity }}"
- name: "Terrarium weather pressure"
state_topic: "z2m_deconz/terrarium_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "hPa"
device_class: "pressure"
value_template: "{{ value_json.pressure }}"
- name: "Terrarium weather battery"
state_topic: "z2m_deconz/terrarium_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Terrarium weather LQI"
state_topic: "z2m_deconz/terrarium_weather"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
# Terrarium weather sensor
- name: "Aqara TVOC temperature"
state_topic: "z2m_deconz/aqara_tvoc"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "°C"
device_class: "temperature"
value_template: "{{ value_json.temperature }}"
- name: "Aqara TVOC humidity"
state_topic: "z2m_deconz/aqara_tvoc"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "humidity"
value_template: "{{ value_json.humidity }}"
- name: "Aqara TVOC voc"
state_topic: "z2m_deconz/aqara_tvoc"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "ppb"
device_class: "volatile_organic_compounds"
value_template: "{{ value_json.voc }}"
- name: "Aqara TVOC battery"
state_topic: "z2m_deconz/aqara_tvoc"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Aqara TVOC LQI"
state_topic: "z2m_deconz/aqara_tvoc"
availability_topic: "z2m_deconz/bridge/state"
device_class: "signal_strength"
unit_of_measurement: "lqi"
value_template: "{{ value_json.linkquality }}"
+3 -3
View File
@@ -103,12 +103,12 @@ automation:
- alias: Climate · Heating · Link living room radiator to windows - alias: Climate · Heating · Link living room radiator to windows
trigger: trigger:
- platform: state - platform: state
entity_id: binary_sensor.living_room_right_window entity_id: binary_sensor.living_room_right_window_contact
action: action:
- choose: - choose:
- conditions: - conditions:
- condition: state - condition: state
entity_id: binary_sensor.living_room_right_window entity_id: binary_sensor.living_room_right_window_contact
state: "on" state: "on"
- condition: not - condition: not
conditions: conditions:
@@ -125,7 +125,7 @@ automation:
domain: climate domain: climate
- conditions: - conditions:
- condition: state - condition: state
entity_id: binary_sensor.living_room_right_window entity_id: binary_sensor.living_room_right_window_contact
state: "off" state: "off"
- condition: state - condition: state
entity_id: climate.living_room_radiator_mode entity_id: climate.living_room_radiator_mode
+18 -98
View File
@@ -2,113 +2,33 @@ group:
all_windows: all_windows:
name: All windows name: All windows
entities: entities:
- binary_sensor.living_room_right_window - binary_sensor.living_room_right_window_contact
- binary_sensor.bedroom_left_window - binary_sensor.bedroom_left_window_contact
- binary_sensor.bedroom_right_window - binary_sensor.bedroom_right_window_contact
- binary_sensor.kitchen_window - binary_sensor.kitchen_window_contact
bedroom_windows: bedroom_windows:
name: Bedroom windows name: Bedroom windows
entities: entities:
- binary_sensor.bedroom_left_window - binary_sensor.bedroom_left_window_contact
- binary_sensor.bedroom_right_window - binary_sensor.bedroom_right_window_contact
mqtt:
binary_sensor:
- name: "Living room right window"
state_topic: "z2m_deconz/living_room_right_window"
availability_topic: "z2m_deconz/bridge/state"
payload_on: false
payload_off: true
value_template: "{{ value_json.contact }}"
device_class: "window"
- name: "Bedroom left window"
state_topic: "z2m_deconz/bedroom_left_window"
availability_topic: "z2m_deconz/bridge/state"
payload_on: false
payload_off: true
value_template: "{{ value_json.contact }}"
device_class: "window"
- name: "Bedroom right window"
state_topic: "z2m_deconz/bedroom_right_window"
availability_topic: "z2m_deconz/bridge/state"
payload_on: false
payload_off: true
value_template: "{{ value_json.contact }}"
device_class: "window"
- name: "Kitchen window"
state_topic: "z2m_deconz/kitchen_window"
availability_topic: "z2m_deconz/bridge/state"
payload_on: false
payload_off: true
value_template: "{{ value_json.contact }}"
device_class: "window"
sensor:
- name: "Living room right window battery"
state_topic: "z2m_deconz/living_room_right_window"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Living room right window LQI"
state_topic: "z2m_deconz/living_room_right_window"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:signal"
unit_of_measurement: "lqi"
value_template: "{{ value_json.linkquality }}"
- name: "Bedroom left window battery"
state_topic: "z2m_deconz/bedroom_left_window"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Bedroom left window LQI"
state_topic: "z2m_deconz/bedroom_left_window"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:signal"
unit_of_measurement: "lqi"
value_template: "{{ value_json.linkquality }}"
- name: "Bedroom right window battery"
state_topic: "z2m_deconz/bedroom_right_window"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Bedroom right window LQI"
state_topic: "z2m_deconz/bedroom_right_window"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:signal"
unit_of_measurement: "lqi"
value_template: "{{ value_json.linkquality }}"
- name: "Kitchen window battery"
state_topic: "z2m_deconz/kitchen_window"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Kitchen window LQI"
state_topic: "z2m_deconz/kitchen_window"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:signal"
unit_of_measurement: "lqi"
value_template: "{{ value_json.linkquality }}"
sensor: sensor:
- platform: template - platform: template
sensors: sensors:
open_window_count: open_window_count:
friendly_name: Open window count friendly_name: Open windozw count
value_template: >- value_template: >-
{% set entityStates = states | selectattr('entity_id', 'in', state_attr('group.all_windows', 'entity_id')) %} {% set entityStates = states | selectattr('entity_id', 'in', state_attr('group.all_windows', 'entity_id')) %}
{{ entityStates | selectattr('state', 'eq', 'on') | list | count | int }} {{ entityStates | selectattr('state', 'eq', 'on') | list | count | int }}
homeassistant:
customize:
binary_sensor.living_room_right_window_contact:
device_class: window
binary_sensor.bedroom_left_window_contact:
device_class: window
binary_sensor.bedroom_right_window_contact:
device_class: window
binary_sensor.kitchen_window_contact:
device_class: window
+1 -1
View File
@@ -95,7 +95,7 @@ automation:
- alias: Lighting · Bedroom · Door open - alias: Lighting · Bedroom · Door open
trigger: trigger:
platform: state platform: state
entity_id: binary_sensor.bedroom_door entity_id: binary_sensor.bedroom_door_contact
to: "on" to: "on"
condition: condition:
and: and:
+1 -1
View File
@@ -20,7 +20,7 @@ automation:
- service: light.turn_on - service: light.turn_on
entity_id: entity_id:
- light.living_room_main - light.living_room_main
- light.pc - light.hue_ambiance_7
- light.master_bedroom_main - light.master_bedroom_main
- light.hallway - light.hallway
- light.kitchen - light.kitchen
+4 -72
View File
@@ -1,71 +1,3 @@
# mqtt:
# light:
# - name: "Hallway main"
# state_topic: "z2m_deconz/light_hallway_main"
# availability_topic: "z2m_deconz/bridge/state"
# brightness: true
# color_temp: true
# xy: false
# hs: false
# schema: "json"
# command_topic: "z2m_deconz/light_hallway_main/set"
# brightness_scale: 254
# max_mireds: 500
# min_mireds: 150
# - name: "Hallway entrance"
# state_topic: "z2m_deconz/light_hallway_entrance"
# availability_topic: "z2m_deconz/bridge/state"
# brightness: true
# color_temp: false
# xy: false
# hs: false
# schema: "json"
# command_topic: "z2m_deconz/light_hallway_entrance/set"
# brightness_scale: 254
# - name: "Kitchen main"
# state_topic: "z2m_deconz/light_kitchen_main"
# availability_topic: "z2m_deconz/bridge/state"
# brightness: true
# color_temp: true
# xy: false
# hs: false
# schema: "json"
# command_topic: "z2m_deconz/light_kitchen_main/set"
# brightness_scale: 254
# max_mireds: 500
# min_mireds: 150
# effect: true
# effect_list:
# - "blink"
# - "breathe"
# - "okay"
# - "channel_change"
# - "finish_effect"
# - name: "Kitchen secondary"
# availability_topic: "z2m_deconz/bridge/state"
# brightness: true
# brightness_scale: 254
# color_mode: true
# command_topic: "z2m_deconz/light_kitchen_secondary/set"
# effect: true
# effect_list:
# - "blink"
# - "breathe"
# - "okay"
# - "channel_change"
# - "finish_effect"
# - "stop_effect"
# json_attributes_topic: "z2m_deconz/light_kitchen_secondary"
# max_mireds: 454
# min_mireds: 153
# schema: "json"
# state_topic: "z2m_deconz/light_kitchen_secondary"
# supported_color_modes: ["color_temp"]
light: light:
- platform: group - platform: group
name: Living room main name: Living room main
@@ -79,7 +11,7 @@ light:
name: Living room ceiling name: Living room ceiling
entities: entities:
- light.living_room_main - light.living_room_main
- light.pc - light.hue_ambiance_7
- platform: group - platform: group
name: Living room ambient name: Living room ambient
@@ -150,7 +82,7 @@ light:
name: On after dark name: On after dark
entities: entities:
- light.living_room_main - light.living_room_main
- light.pc - light.hue_ambiance_7
- light.master_bedroom_main - light.master_bedroom_main
- light.bedside - light.bedside
- light.hallway - light.hallway
@@ -159,7 +91,7 @@ light:
name: Ceiling name: Ceiling
entities: entities:
- light.living_room_main - light.living_room_main
- light.pc - light.hue_ambiance_7
- light.master_bedroom_main - light.master_bedroom_main
- light.kitchen - light.kitchen
- light.hallway - light.hallway
@@ -261,7 +193,7 @@ homeassistant:
light.living_room_main: light.living_room_main:
icon: bha:ceiling-spot-lamp icon: bha:ceiling-spot-lamp
light.pc: light.hue_ambiance_7:
friendly_name: PC friendly_name: PC
icon: bha:outdoor-lamp-variant icon: bha:outdoor-lamp-variant
-616
View File
@@ -1,616 +0,0 @@
mqtt:
light:
- name: "hue_white_1"
state_topic: "z2m_deconz/hue_white_1"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: false
xy: false
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_white_1/set"
brightness_scale: 254
- name: "hue_white_2"
state_topic: "z2m_deconz/hue_white_2"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: false
xy: false
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_white_2/set"
brightness_scale: 254
- name: "hue_white_5"
state_topic: "z2m_deconz/hue_white_5"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: false
xy: false
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_white_5/set"
brightness_scale: 254
- name: "hue_white_6"
state_topic: "z2m_deconz/hue_white_6"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: false
xy: false
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_white_6/set"
brightness_scale: 254
- name: "hue_ambiance_1"
state_topic: "z2m_deconz/hue_ambiance_1"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: false
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_ambiance_1/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
- name: "hue_ambiance_2"
state_topic: "z2m_deconz/hue_ambiance_2"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: false
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_ambiance_2/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
- name: "hue_ambiance_3"
state_topic: "z2m_deconz/hue_ambiance_3"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: false
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_ambiance_3/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
- name: "hue_ambiance_4"
state_topic: "z2m_deconz/hue_ambiance_4"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: false
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_ambiance_4/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
- name: "hue_ambiance_5"
state_topic: "z2m_deconz/hue_ambiance_5"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: false
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_ambiance_5/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
- name: "hue_ambiance_6"
state_topic: "z2m_deconz/hue_ambiance_6"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: false
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_ambiance_6/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
- name: "pc"
state_topic: "z2m_deconz/hue_ambiance_7"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: false
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_ambiance_7/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
- name: "hue_ambiance_8"
state_topic: "z2m_deconz/hue_ambiance_8"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: false
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_ambiance_8/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
- name: "hue_1"
state_topic: "z2m_deconz/hue_1"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: true
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_1/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
- "stop_effect"
- name: "hue_2"
state_topic: "z2m_deconz/hue_2"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: true
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_2/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
- "stop_effect"
- name: "hue_3"
state_topic: "z2m_deconz/hue_3"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: true
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_3/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
- "stop_effect"
- name: "hue_4"
state_topic: "z2m_deconz/hue_4"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: true
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_4/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
- "stop_effect"
- name: "hue_5"
state_topic: "z2m_deconz/hue_5"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: true
hs: false
schema: "json"
command_topic: "z2m_deconz/hue_5/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
- "stop_effect"
sensor:
- name: "hue_white_1_lqi"
state_topic: "z2m_deconz/hue_white_1"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_white_1_update_state"
state_topic: "z2m_deconz/hue_white_1"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_white_2_lqi"
state_topic: "z2m_deconz/hue_white_2"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_white_2_update_state"
state_topic: "z2m_deconz/hue_white_2"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_white_5_lqi"
state_topic: "z2m_deconz/hue_white_5"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_white_5_update_state"
state_topic: "z2m_deconz/hue_white_5"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_white_6_lqi"
state_topic: "z2m_deconz/hue_white_6"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_white_6_update_state"
state_topic: "z2m_deconz/hue_white_6"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_ambiance_1_lqi"
state_topic: "z2m_deconz/hue_ambiance_1"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_ambiance_1_update_state"
state_topic: "z2m_deconz/hue_ambiance_1"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_ambiance_2_lqi"
state_topic: "z2m_deconz/hue_ambiance_2"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_ambiance_2_update_state"
state_topic: "z2m_deconz/hue_ambiance_2"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_ambiance_3_lqi"
state_topic: "z2m_deconz/hue_ambiance_3"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_ambiance_3_update_state"
state_topic: "z2m_deconz/hue_ambiance_3"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_ambiance_4_lqi"
state_topic: "z2m_deconz/hue_ambiance_4"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_ambiance_4_update_state"
state_topic: "z2m_deconz/hue_ambiance_4"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_ambiance_5_lqi"
state_topic: "z2m_deconz/hue_ambiance_5"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_ambiance_5_update_state"
state_topic: "z2m_deconz/hue_ambiance_5"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_ambiance_6_lqi"
state_topic: "z2m_deconz/hue_ambiance_6"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_ambiance_6_update_state"
state_topic: "z2m_deconz/hue_ambiance_6"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "pc_lqi"
state_topic: "z2m_deconz/hue_ambiance_7"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "pc_update_state"
state_topic: "z2m_deconz/hue_ambiance_7"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_ambiance_8_lqi"
state_topic: "z2m_deconz/hue_ambiance_8"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_ambiance_8_update_state"
state_topic: "z2m_deconz/hue_ambiance_8"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_1_lqi"
state_topic: "z2m_deconz/hue_1"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_1_update_state"
state_topic: "z2m_deconz/hue_1"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_2_lqi"
state_topic: "z2m_deconz/hue_2"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_2_update_state"
state_topic: "z2m_deconz/hue_2"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_3_lqi"
state_topic: "z2m_deconz/hue_3"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_3_update_state"
state_topic: "z2m_deconz/hue_3"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_4_lqi"
state_topic: "z2m_deconz/hue_4"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_4_update_state"
state_topic: "z2m_deconz/hue_4"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
- name: "hue_5_lqi"
state_topic: "z2m_deconz/hue_5"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "hue_5_update_state"
state_topic: "z2m_deconz/hue_5"
availability_topic: "z2m_deconz/bridge/state"
icon: "mdi:update"
value_template: "{{ value_json['update']['state'] }}"
binary_sensor:
- name: "pc_update_available"
state_topic: "z2m_deconz/hue_white_1"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
- name: "hue_white_2_update_available"
state_topic: "z2m_deconz/hue_white_2"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
- name: "hue_white_5_update_available"
state_topic: "z2m_deconz/hue_white_5"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
- name: "hue_white_6_update_available"
state_topic: "z2m_deconz/hue_white_6"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
- name: "hue_ambiance_1_update_available"
state_topic: "z2m_deconz/hue_ambiance_1"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
- name: "hue_ambiance_2_update_available"
state_topic: "z2m_deconz/hue_ambiance_2"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
- name: "hue_ambiance_3_update_available"
state_topic: "z2m_deconz/hue_ambiance_3"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
- name: "hue_ambiance_4_update_available"
state_topic: "z2m_deconz/hue_ambiance_4"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
- name: "hue_ambiance_5_update_available"
state_topic: "z2m_deconz/hue_ambiance_5"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
- name: "hue_ambiance_6_update_available"
state_topic: "z2m_deconz/hue_ambiance_6"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
- name: "hue_1_update_available"
state_topic: "z2m_deconz/hue_1"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
- name: "hue_2_update_available"
state_topic: "z2m_deconz/hue_2"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
- name: "hue_3_update_available"
state_topic: "z2m_deconz/hue_3"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
- name: "hue_4_update_available"
state_topic: "z2m_deconz/hue_4"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
- name: "hue_5_update_available"
state_topic: "z2m_deconz/hue_5"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.update_available}}"
+1 -162
View File
@@ -1,29 +1,5 @@
mqtt: mqtt:
light: light:
- name: "tradfri_1"
state_topic: "z2m_deconz/tradfri_1"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: false
schema: "json"
command_topic: "z2m_deconz/tradfri_1/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
- name: "tradfri_large"
state_topic: "z2m_deconz/tradfri_large"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: false
schema: "json"
command_topic: "z2m_deconz/tradfri_large/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
- name: "light_le_1" - name: "light_le_1"
state_topic: "tele/light_le_1/STATE" state_topic: "tele/light_le_1/STATE"
state_value_template: "{{ value_json.POWER }}" state_value_template: "{{ value_json.POWER }}"
@@ -124,10 +100,6 @@ mqtt:
color_temp_command_topic: "cmnd/light_lohas_2/CT" color_temp_command_topic: "cmnd/light_lohas_2/CT"
color_temp_state_topic: "tele/light_lohas_2/STATE" color_temp_state_topic: "tele/light_lohas_2/STATE"
color_temp_value_template: "{{ value_json.CT }}" color_temp_value_template: "{{ value_json.CT }}"
# rgb_command_topic: "cmnd/light_lohas_2/Color"
# rgb_state_topic: "tele/light_lohas_2/STATE"
# rgb_command_template: "{{ '%02X%02X%02X' | format(red, green, blue) }}"
# rgb_value_template: "{{ (value_json.Color[0:2]|int(base=16),value_json.Color[2:4]|int(base=16),value_json.Color[4:6]|int(base=16)) | join(',')}}"
qos: 1 qos: 1
retain: false retain: false
effect_command_topic: "cmnd/light_lohas_2/Scheme" effect_command_topic: "cmnd/light_lohas_2/Scheme"
@@ -155,10 +127,6 @@ mqtt:
color_temp_command_topic: "cmnd/light_lohas_6/CT" color_temp_command_topic: "cmnd/light_lohas_6/CT"
color_temp_state_topic: "tele/light_lohas_6/STATE" color_temp_state_topic: "tele/light_lohas_6/STATE"
color_temp_value_template: "{{ value_json.CT }}" color_temp_value_template: "{{ value_json.CT }}"
# rgb_command_topic: "cmnd/light_lohas_6/Color"
# rgb_state_topic: "tele/light_lohas_6/STATE"
# rgb_command_template: "{{ '%02X%02X%02X=' | format(red, green, blue)}}"
# rgb_value_template: "{{ (value_json.Color[0:2]|int(base=16),value_json.Color[2:4]|int(base=16),value_json.Color[4:6]|int(base=16)) | join(',')}}"
qos: 1 qos: 1
retain: false retain: false
effect_command_topic: "cmnd/light_lohas_6/Scheme" effect_command_topic: "cmnd/light_lohas_6/Scheme"
@@ -166,34 +134,7 @@ mqtt:
effect_value_template: "{{value_json.Scheme}}" effect_value_template: "{{value_json.Scheme}}"
effect_list: [0, 1, 2, 3, 4] effect_list: [0, 1, 2, 3, 4]
- name: "ledvance_1"
state_topic: "z2m_deconz/ledvance_1"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: false
hs: false
schema: "json"
command_topic: "z2m_deconz/ledvance_1/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
sensor: sensor:
- name: "tradfri_1_lqi"
state_topic: "z2m_deconz/tradfri_1"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "tradfri_large_lqi"
state_topic: "z2m_deconz/tradfri_large"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
- name: "light_le_1_wifi" - name: "light_le_1_wifi"
availability_topic: "tele/light_le_1/LWT" availability_topic: "tele/light_le_1/LWT"
device_class: signal_strength device_class: signal_strength
@@ -248,14 +189,7 @@ mqtt:
unit_of_measurement: "%" unit_of_measurement: "%"
value_template: "{{ value_json.Wifi.RSSI }}" value_template: "{{ value_json.Wifi.RSSI }}"
- name: "ledvance_1_lqi" # ## Switch
state_topic: "z2m_deconz/ledvance_1"
availability_topic: "z2m_deconz/bridge/state"
value_template: "{{ value_json.linkquality }}"
unit_of_measurement: "lqi"
device_class: "signal_strength"
## Switch
switch: switch:
- name: "light_le_1_fade" - name: "light_le_1_fade"
availability_topic: "tele/light_le_1/LWT" availability_topic: "tele/light_le_1/LWT"
@@ -338,98 +272,3 @@ automation:
data: data:
topic: "cmnd/tasmotas/STATE" topic: "cmnd/tasmotas/STATE"
payload: "" payload: ""
- alias: Lighting · Sync Zigbee states on start-up
initial_state: true
trigger:
platform: homeassistant
event: start
action:
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_white_1/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_white_2/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_white_5/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_white_6/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_ambiance_1/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_ambiance_2/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_ambiance_3/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_ambiance_4/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_ambiance_5/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_ambiance_6/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_ambiance_7/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_ambiance_8/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_1/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_2/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_3/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_4/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_5/get"
payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/tradfri_1/get"
payload: ""
# - service: mqtt.publish
# data:
# topic: "z2m_deconz/light_hallway_main/get"
# payload: ""
# - service: mqtt.publish
# data:
# topic: "z2m_deconz/light_hallway_entrance/get"
# payload: ""
# - service: mqtt.publish
# data:
# topic: "z2m_deconz/light_kitchen_main/get"
# payload: ""
# - service: mqtt.publish
# data:
# topic: "z2m_deconz/light_kitchen_secondary/get"
# payload: ""
-34
View File
@@ -1,34 +0,0 @@
# mqtt:
# light:
# - name: "neo_1"
# state_topic: "z2m_deconz/neo_1"
# availability_topic: "z2m_deconz/bridge/state"
# brightness: true
# color_temp: true
# xy: true
# hs: false
# schema: "json"
# command_topic: "z2m_deconz/neo_1/set"
# brightness_scale: 254
# max_mireds: 500
# min_mireds: 150
# - name: "neo_2"
# state_topic: "z2m_deconz/neo_2"
# availability_topic: "z2m_deconz/bridge/state"
# brightness: true
# color_temp: true
# xy: true
# hs: false
# schema: "json"
# command_topic: "z2m_deconz/neo_2/set"
# brightness_scale: 254
# max_mireds: 500
# min_mireds: 150
# sensor:
# - name: "neo_1_lqi"
# state_topic: "z2m_deconz/neo_1"
# availability_topic: "z2m_deconz/bridge/state"
# value_template: "{{ value_json.linkquality }}"
# unit_of_measurement: "lqi"
# device_class: "signal_strength"
+3 -3
View File
@@ -14,7 +14,7 @@ automation:
to: "on" to: "on"
entity_id: entity_id:
- light.living_room_main - light.living_room_main
- light.pc - light.hue_ambiance_7
- light.master_bedroom_main - light.master_bedroom_main
- light.kitchen_main - light.kitchen_main
- light.kitchen_secondary - light.kitchen_secondary
@@ -68,8 +68,8 @@ automation:
light.living_room_main: light.living_room_main:
state: "{{ states('light.living_room_main') }}" state: "{{ states('light.living_room_main') }}"
color_temp: "{{ trigger.to_state }}" color_temp: "{{ trigger.to_state }}"
light.pc: light.hue_ambiance_7:
state: "{{ states('light.pc') }}" state: "{{ states('light.hue_ambiance_7') }}"
color_temp: "{{ trigger.to_state }}" color_temp: "{{ trigger.to_state }}"
light.master_bedroom_main: light.master_bedroom_main:
state: "{{ states('light.master_bedroom_main') }}" state: "{{ states('light.master_bedroom_main') }}"
+2 -2
View File
@@ -23,7 +23,7 @@ automation:
scene_id: plex_before_start scene_id: plex_before_start
snapshot_entities: snapshot_entities:
- light.living_room_main - light.living_room_main
- light.pc - light.hue_ambiance_7
- light.living_room_ambient_main - light.living_room_ambient_main
- light.light_lohas_2 - light.light_lohas_2
- light.hallway_entrance - light.hallway_entrance
@@ -37,7 +37,7 @@ automation:
- light.living_room_main - light.living_room_main
- service: light.turn_off - service: light.turn_off
entity_id: entity_id:
- light.pc - light.hue_ambiance_7
- light.living_room_ambient_main - light.living_room_ambient_main
- light.light_lohas_2 - light.light_lohas_2
- light.hallway_main - light.hallway_main
+1 -1
View File
@@ -18,7 +18,7 @@
# - service: cover.close_cover # - service: cover.close_cover
# entity_id: cover.living_room # entity_id: cover.living_room
# - service: light.turn_on # - service: light.turn_on
# entity_id: light.pc # entity_id: light.hue_ambiance_7
# - service: media_player.media_stop # - service: media_player.media_stop
# entity_id: # entity_id:
# - media_player.living_room # - media_player.living_room
+12 -12
View File
@@ -23,8 +23,8 @@ homekit:
- light.living_room - light.living_room
- light.living_room_main - light.living_room_main
- light.living_room_ambient - light.living_room_ambient
- light.pc - light.hue_ambiance_7
- binary_sensor.living_room_right_window - binary_sensor.living_room_right_window_contact
- climate.living_room_radiator_mode - climate.living_room_radiator_mode
- climate.toshiba_ac - climate.toshiba_ac
- cover.living_room - cover.living_room
@@ -40,9 +40,9 @@ homekit:
- light.master_bedroom - light.master_bedroom
- light.master_bedroom_main - light.master_bedroom_main
- light.bedside - light.bedside
- binary_sensor.bedroom_door - binary_sensor.bedroom_door_contact
- binary_sensor.bedroom_left_window - binary_sensor.bedroom_left_window_contact
- binary_sensor.bedroom_right_window - binary_sensor.bedroom_right_window_contact
- climate.bedroom_radiator_mode - climate.bedroom_radiator_mode
- fan.philips_airpurifier - fan.philips_airpurifier
- media_player.master_bedroom - media_player.master_bedroom
@@ -57,7 +57,7 @@ homekit:
- light.kitchen_secondary - light.kitchen_secondary
- climate.kitchen_radiator_mode - climate.kitchen_radiator_mode
- binary_sensor.kitchen_motion_occupancy - binary_sensor.kitchen_motion_occupancy
- binary_sensor.kitchen_window - binary_sensor.kitchen_window_contact
- input_number.brita_remaining_liters - input_number.brita_remaining_liters
- script.brita_pour_water - script.brita_pour_water
- sensor.kitchen_weather_humidity - sensor.kitchen_weather_humidity
@@ -81,9 +81,9 @@ homekit:
name: Living Room Main name: Living Room Main
light.living_room_ambient: light.living_room_ambient:
name: Living Room Ambient name: Living Room Ambient
light.pc: light.hue_ambiance_7:
name: PC Light name: PC Light
binary_sensor.living_room_right_window: binary_sensor.living_room_right_window_contact:
linked_battery_sensor: sensor.living_room_right_window_battery linked_battery_sensor: sensor.living_room_right_window_battery
low_battery_threshold: 20 low_battery_threshold: 20
name: Living Room Window name: Living Room Window
@@ -121,15 +121,15 @@ homekit:
name: Bedroom Air Quality name: Bedroom Air Quality
sensor.purifier_allergens: sensor.purifier_allergens:
name: Bedroom Allergens name: Bedroom Allergens
binary_sensor.bedroom_door: binary_sensor.bedroom_door_contact:
linked_battery_sensor: sensor.bedroom_door_battery linked_battery_sensor: sensor.bedroom_door_battery
low_battery_threshold: 20 low_battery_threshold: 20
name: Bedroom Door name: Bedroom Door
binary_sensor.bedroom_left_window: binary_sensor.bedroom_left_window_contact:
linked_battery_sensor: sensor.bedroom_left_window_battery linked_battery_sensor: sensor.bedroom_left_window_battery
low_battery_threshold: 20 low_battery_threshold: 20
name: Bedroom Left Window name: Bedroom Left Window
binary_sensor.bedroom_right_window: binary_sensor.bedroom_right_window_contact:
linked_battery_sensor: sensor.bedroom_right_window_battery linked_battery_sensor: sensor.bedroom_right_window_battery
low_battery_threshold: 20 low_battery_threshold: 20
name: Bedroom Right Window name: Bedroom Right Window
@@ -152,7 +152,7 @@ homekit:
linked_battery_sensor: sensor.kitchen_motion_battery linked_battery_sensor: sensor.kitchen_motion_battery
low_battery_threshold: 20 low_battery_threshold: 20
name: Kitchen Motion name: Kitchen Motion
binary_sensor.kitchen_window: binary_sensor.kitchen_window_contact:
linked_battery_sensor: sensor.kitchen_window_battery linked_battery_sensor: sensor.kitchen_window_battery
low_battery_threshold: 20 low_battery_threshold: 20
name: Kitchen Window name: Kitchen Window
+1 -1
View File
@@ -42,7 +42,7 @@ automation:
- alias: Notification · Door opened - alias: Notification · Door opened
trigger: trigger:
platform: state platform: state
entity_id: binary_sensor.front_door entity_id: binary_sensor.front_door_contact
to: "on" to: "on"
for: for:
minutes: 2 minutes: 2
+2 -2
View File
@@ -29,7 +29,7 @@ automation:
- alias: Security · Door opened while in night mode - alias: Security · Door opened while in night mode
trigger: trigger:
- platform: state - platform: state
entity_id: binary_sensor.front_door entity_id: binary_sensor.front_door_contact
to: "on" to: "on"
condition: condition:
condition: state condition: state
@@ -49,7 +49,7 @@ automation:
- alias: Security · Door opened while away - alias: Security · Door opened while away
trigger: trigger:
- platform: state - platform: state
entity_id: binary_sensor.front_door entity_id: binary_sensor.front_door_contact
to: "on" to: "on"
condition: condition:
and: and:
+2 -2
View File
@@ -71,8 +71,8 @@ automation:
Guest mode: {{ states('input_boolean.guest_mode') }} Guest mode: {{ states('input_boolean.guest_mode') }}
Windows: Windows:
Living room: {{ states('binary_sensor.living_room_right_window') }} Living room: {{ states('binary_sensor.living_room_right_window_contact') }}
Master bedroom: {{ states('binary_sensor.bedroom_right_window') }} Master bedroom: {{ states('binary_sensor.bedroom_right_window_contact') }}
Lights: Lights:
Living room: {{ states('light.living_room') }} Living room: {{ states('light.living_room') }}
+2 -48
View File
@@ -2,54 +2,8 @@ group:
all_doors: all_doors:
name: All doors name: All doors
entities: entities:
- binary_sensor.front_door - binary_sensor.front_door_contact
- binary_sensor.bedroom_door - binary_sensor.bedroom_door_contact
mqtt:
sensor:
- name: "Bedroom door battery"
state_topic: "z2m_deconz/bedroom_door"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Bedroom door LQI"
state_topic: "z2m_deconz/bedroom_door"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
- name: "Front door battery"
state_topic: "z2m_deconz/front_door"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Front door LQI"
state_topic: "z2m_deconz/front_door"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
binary_sensor:
- name: "Bedroom door"
state_topic: "z2m_deconz/bedroom_door"
availability_topic: "z2m_deconz/bridge/state"
payload_on: false
payload_off: true
value_template: "{{ value_json.contact }}"
device_class: "door"
- name: "Front door"
state_topic: "z2m_deconz/front_door"
availability_topic: "z2m_deconz/bridge/state"
payload_on: false
payload_off: true
value_template: "{{ value_json.contact }}"
device_class: "door"
sensor: sensor:
- platform: template - platform: template
-82
View File
@@ -13,85 +13,3 @@ group:
- binary_sensor.hallway_motion_occupancy - binary_sensor.hallway_motion_occupancy
- binary_sensor.hallway_motion_2_occupancy - binary_sensor.hallway_motion_2_occupancy
# - binary_sensor.trisensor_home_security_motion_detection # - binary_sensor.trisensor_home_security_motion_detection
mqtt:
binary_sensor:
- name: "Hallway motion occupancy"
state_topic: "z2m_deconz/hallway_motion"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.occupancy }}"
device_class: "motion"
- name: "Hallway motion 2 occupancy"
state_topic: "z2m_deconz/hallway_motion_2"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.occupancy }}"
device_class: "motion"
- name: "Kitchen motion occupancy"
state_topic: "z2m_deconz/kitchen_motion"
availability_topic: "z2m_deconz/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.occupancy }}"
device_class: "motion"
sensor:
# Hallway Motion
- name: "Hallway motion illuminance"
state_topic: "z2m_deconz/hallway_motion"
availability_topic: "z2m_deconz/bridge/state"
device_class: "illuminance"
value_template: "{{ value_json.illuminance_lux }}"
- name: "Hallway motion battery"
state_topic: "z2m_deconz/hallway_motion"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Hallway motion LQI"
state_topic: "z2m_deconz/hallway_motion"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
# Hallway Motion 2
- name: "Hallway motion 2 illuminance"
state_topic: "z2m_deconz/hallway_motion_2"
availability_topic: "z2m_deconz/bridge/state"
device_class: "illuminance"
value_template: "{{ value_json.illuminance_lux }}"
- name: "Hallway motion 2 battery"
state_topic: "z2m_deconz/hallway_motion_2"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Hallway motion 2 LQI"
state_topic: "z2m_deconz/hallway_motion_2"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
# Kitchen Motion
- name: "Kitchen motion illuminance"
state_topic: "z2m_deconz/kitchen_motion"
availability_topic: "z2m_deconz/bridge/state"
device_class: "illuminance"
value_template: "{{ value_json.illuminance_lux }}"
- name: "Kitchen motion battery"
state_topic: "z2m_deconz/kitchen_motion"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- name: "Kitchen motion LQI"
state_topic: "z2m_deconz/kitchen_motion"
availability_topic: "z2m_deconz/bridge/state"
unit_of_measurement: "lqi"
device_class: "signal_strength"
value_template: "{{ value_json.linkquality }}"
+2 -2
View File
@@ -1,8 +1,8 @@
>- >-
{%- if is_state('group.all_windows', 'on') -%} {%- if is_state('group.all_windows', 'on') -%}
{%- if is_state('binary_sensor.living_room_right_window', 'on') -%} The living room window is opened. {% endif %} {%- if is_state('binary_sensor.living_room_right_window_contact', 'on') -%} The living room window is opened. {% endif %}
{%- if is_state('binary_sensor.bedroom_right_window', 'on') -%} The master bedroom window is opened. {%- endif -%} {%- if is_state('binary_sensor.bedroom_right_window_contact', 'on') -%} The master bedroom window is opened. {%- endif -%}
{%- else -%} {%- else -%}
All windows are closed. All windows are closed.
{%- endif -%} {%- endif -%}
+2 -2
View File
@@ -12,12 +12,12 @@
{%- if (states('sensor.dark_sky_temperature') | int) < (states('sensor.bedroom_weather_temperature') | int) -%} {%- if (states('sensor.dark_sky_temperature') | int) < (states('sensor.bedroom_weather_temperature') | int) -%}
{%- if is_state('binary_sensor.bedroom_right_window', 'off') {%- if is_state('binary_sensor.bedroom_right_window_contact', 'off')
and (states('sensor.bedroom_weather_temperature') | int) > 22 -%} and (states('sensor.bedroom_weather_temperature') | int) > 22 -%}
You should probably open the master bedroom window{{ getting_hot | random }} You should probably open the master bedroom window{{ getting_hot | random }}
{%- endif -%} {%- endif -%}
{%- if is_state('binary_sensor.bedroom_right_window', 'on') {%- if is_state('binary_sensor.bedroom_right_window_contact', 'on')
and (states('sensor.bedroom_weather_temperature') | int) < 18 -%} and (states('sensor.bedroom_weather_temperature') | int) < 18 -%}
You should probably close the master bedroom window{{ getting_cold | random }} You should probably close the master bedroom window{{ getting_cold | random }}
{%- endif -%} {%- endif -%}