mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-06-21 02:47:44 +00:00
MQTT Changes for 2022.6
This commit is contained in:
@@ -5,39 +5,53 @@ group:
|
||||
- binary_sensor.front_door
|
||||
- binary_sensor.bedroom_door
|
||||
|
||||
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:
|
||||
- platform: mqtt
|
||||
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 }}"
|
||||
|
||||
- platform: mqtt
|
||||
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 }}"
|
||||
|
||||
- platform: mqtt
|
||||
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 }}"
|
||||
|
||||
- platform: mqtt
|
||||
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 }}"
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
open_door_count:
|
||||
@@ -45,22 +59,3 @@ sensor:
|
||||
value_template: >-
|
||||
{% set entityStates = states | selectattr('entity_id', 'in', state_attr('group.all_doors', 'entity_id')) %}
|
||||
{{ entityStates | selectattr('state', 'eq', 'on') | list | count | int }}
|
||||
|
||||
|
||||
binary_sensor:
|
||||
- platform: mqtt
|
||||
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"
|
||||
- platform: mqtt
|
||||
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"
|
||||
|
||||
@@ -14,99 +14,89 @@ group:
|
||||
- binary_sensor.hallway_motion_2_occupancy
|
||||
# - binary_sensor.trisensor_home_security_motion_detection
|
||||
|
||||
binary_sensor:
|
||||
- platform: mqtt
|
||||
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"
|
||||
- platform: mqtt
|
||||
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"
|
||||
- platform: mqtt
|
||||
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"
|
||||
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 }}"
|
||||
|
||||
sensor:
|
||||
# Hallway Motion
|
||||
- platform: mqtt
|
||||
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 }}"
|
||||
- platform: mqtt
|
||||
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 }}"
|
||||
- platform: mqtt
|
||||
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
|
||||
- platform: mqtt
|
||||
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 }}"
|
||||
- platform: mqtt
|
||||
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 }}"
|
||||
- platform: mqtt
|
||||
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
|
||||
- platform: mqtt
|
||||
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 }}"
|
||||
- platform: mqtt
|
||||
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 }}"
|
||||
- platform: mqtt
|
||||
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 }}"
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
active_motion_sensors:
|
||||
|
||||
Reference in New Issue
Block a user