Switch light groups from zigbee2mqtt to HA

This commit is contained in:
2022-11-19 17:43:56 +02:00
parent 89c3602a4b
commit e63a8040a8
2 changed files with 176 additions and 151 deletions
+160 -131
View File
@@ -1,68 +1,70 @@
mqtt: # mqtt:
light: # light:
- name: "Hallway main" # - name: "Hallway main"
state_topic: "z2m_deconz/light_hallway_main" # state_topic: "z2m_deconz/light_hallway_main"
availability_topic: "z2m_deconz/bridge/state" # availability_topic: "z2m_deconz/bridge/state"
brightness: true # brightness: true
color_temp: true # color_temp: true
xy: false # xy: false
hs: false # hs: false
schema: "json" # schema: "json"
command_topic: "z2m_deconz/light_hallway_main/set" # command_topic: "z2m_deconz/light_hallway_main/set"
brightness_scale: 254 # brightness_scale: 254
max_mireds: 500 # max_mireds: 500
min_mireds: 150 # min_mireds: 150
- name: "Hallway entrance" # - name: "Hallway entrance"
state_topic: "z2m_deconz/light_hallway_entrance" # state_topic: "z2m_deconz/light_hallway_entrance"
availability_topic: "z2m_deconz/bridge/state" # availability_topic: "z2m_deconz/bridge/state"
brightness: true # brightness: true
color_temp: false # color_temp: false
xy: false # xy: false
hs: false # hs: false
schema: "json" # schema: "json"
command_topic: "z2m_deconz/light_hallway_entrance/set" # command_topic: "z2m_deconz/light_hallway_entrance/set"
brightness_scale: 254 # brightness_scale: 254
- name: "Kitchen main" # - name: "Kitchen main"
state_topic: "z2m_deconz/light_kitchen_main" # state_topic: "z2m_deconz/light_kitchen_main"
availability_topic: "z2m_deconz/bridge/state" # availability_topic: "z2m_deconz/bridge/state"
brightness: true # brightness: true
color_temp: true # color_temp: true
xy: false # xy: false
hs: false # hs: false
schema: "json" # schema: "json"
command_topic: "z2m_deconz/light_kitchen_main/set" # command_topic: "z2m_deconz/light_kitchen_main/set"
brightness_scale: 254 # brightness_scale: 254
max_mireds: 500 # max_mireds: 500
min_mireds: 150 # min_mireds: 150
effect: true # effect: true
effect_list: # effect_list:
- "blink" # - "blink"
- "breathe" # - "breathe"
- "okay" # - "okay"
- "channel_change" # - "channel_change"
- "finish_effect" # - "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"]
- name: "Kitchen secondary"
state_topic: "z2m_deconz/light_kitchen_secondary"
availability_topic: "z2m_deconz/bridge/state"
brightness: true
color_temp: true
xy: false
hs: false
schema: "json"
command_topic: "z2m_deconz/light_kitchen_secondary/set"
brightness_scale: 254
max_mireds: 500
min_mireds: 150
effect: true
effect_list:
- "blink"
- "breathe"
- "okay"
- "channel_change"
- "finish_effect"
light: light:
- platform: group - platform: group
@@ -105,12 +107,39 @@ light:
- light.master_bedroom_main - light.master_bedroom_main
- light.bedside - light.bedside
- platform: group
name: Kitchen main
entities:
- light.tradfri_1
- light.hue_ambiance_6
- light.hue_ambiance_8
- platform: group
name: Kitchen secondary
entities:
- light.hue_ambiance_1
- light.hue_ambiance_2
- light.hue_ambiance_3
- light.hue_ambiance_4
- platform: group - platform: group
name: Kitchen name: Kitchen
entities: entities:
- light.kitchen_main - light.kitchen_main
- light.kitchen_secondary - light.kitchen_secondary
- platform: group
name: Hallway main
entities:
- light.hue_ambiance_5
- light.hue_1
- platform: group
name: Hallway entrance
entities:
- light.hue_white_1
- light.hue_white_2
- platform: group - platform: group
name: Hallway name: Hallway
entities: entities:
@@ -144,78 +173,78 @@ light:
- light.hallway - light.hallway
- light.tradfri_large - light.tradfri_large
automation: # automation:
- alias: Lighting · Sync Kitchen Main states # - alias: Lighting · Sync Kitchen Main states
trigger: # trigger:
platform: state # platform: state
entity_id: light.kitchen_main # entity_id: light.kitchen_main
action: # action:
- delay: "00:00:03" # - delay: "00:00:03"
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/tradfri_1/get" # topic: "z2m_deconz/tradfri_1/get"
payload: "" # payload: ""
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/hue_ambiance_8/get" # topic: "z2m_deconz/hue_ambiance_8/get"
payload: "" # payload: ""
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/hue_ambiance_6/get" # topic: "z2m_deconz/hue_ambiance_6/get"
payload: "" # payload: ""
- alias: Lighting · Sync Kitchen Secondary states # - alias: Lighting · Sync Kitchen Secondary states
trigger: # trigger:
platform: state # platform: state
entity_id: light.kitchen_secondary # entity_id: light.kitchen_secondary
action: # action:
- delay: "00:00:03" # - delay: "00:00:03"
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/hue_ambiance_1/get" # topic: "z2m_deconz/hue_ambiance_1/get"
payload: "" # payload: ""
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/hue_ambiance_2/get" # topic: "z2m_deconz/hue_ambiance_2/get"
payload: "" # payload: ""
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/hue_ambiance_3/get" # topic: "z2m_deconz/hue_ambiance_3/get"
payload: "" # payload: ""
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/hue_ambiance_4/get" # topic: "z2m_deconz/hue_ambiance_4/get"
payload: "" # payload: ""
- alias: Lighting · Sync Hallway Main states # - alias: Lighting · Sync Hallway Main states
trigger: # trigger:
platform: state # platform: state
entity_id: light.hallway_main # entity_id: light.hallway_main
action: # action:
- delay: "00:00:03" # - delay: "00:00:03"
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/hue_ambiance_5/get" # topic: "z2m_deconz/hue_ambiance_5/get"
payload: "" # payload: ""
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/hue_1/get" # topic: "z2m_deconz/hue_1/get"
payload: "" # payload: ""
- alias: Lighting · Sync Hallway Entrance states # - alias: Lighting · Sync Hallway Entrance states
trigger: # trigger:
platform: state # platform: state
entity_id: light.hallway_main # entity_id: light.hallway_main
action: # action:
- delay: "00:00:03" # - delay: "00:00:03"
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/hue_white_1/get" # topic: "z2m_deconz/hue_white_1/get"
payload: "" # payload: ""
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/hue_white_2/get" # topic: "z2m_deconz/hue_white_2/get"
payload: "" # payload: ""
homeassistant: homeassistant:
@@ -353,10 +353,6 @@ automation:
data: data:
topic: "z2m_deconz/hue_white_2/get" topic: "z2m_deconz/hue_white_2/get"
payload: "" payload: ""
- service: mqtt.publish
data:
topic: "z2m_deconz/hue_white_4/get"
payload: ""
- service: mqtt.publish - service: mqtt.publish
data: data:
topic: "z2m_deconz/hue_white_5/get" topic: "z2m_deconz/hue_white_5/get"
@@ -421,19 +417,19 @@ automation:
data: data:
topic: "z2m_deconz/tradfri_1/get" topic: "z2m_deconz/tradfri_1/get"
payload: "" payload: ""
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/light_hallway_main/get" # topic: "z2m_deconz/light_hallway_main/get"
payload: "" # payload: ""
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/light_hallway_entrance/get" # topic: "z2m_deconz/light_hallway_entrance/get"
payload: "" # payload: ""
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/light_kitchen_main/get" # topic: "z2m_deconz/light_kitchen_main/get"
payload: "" # payload: ""
- service: mqtt.publish # - service: mqtt.publish
data: # data:
topic: "z2m_deconz/light_kitchen_secondary/get" # topic: "z2m_deconz/light_kitchen_secondary/get"
payload: "" # payload: ""