diff --git a/config/packages/modules/lighting/setup/groups.yaml b/config/packages/modules/lighting/setup/groups.yaml index b26bcd6..3503e11 100644 --- a/config/packages/modules/lighting/setup/groups.yaml +++ b/config/packages/modules/lighting/setup/groups.yaml @@ -1,4 +1,70 @@ light: + - platform: "mqtt" + name: "Hallway main" + state_topic: "z2m_deconz/light_hallway_main" + availability_topic: "z2m_deconz/bridge/state" + brightness: true + color_temp: false + xy: false + hs: false + schema: "json" + command_topic: "z2m_deconz/light_hallway_main/set" + brightness_scale: 254 + + - platform: "mqtt" + 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 + + - platform: "mqtt" + 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" + + - platform: "mqtt" + 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" + - platform: group name: Living room main entities: @@ -40,20 +106,20 @@ light: - light.bedside - light.bed_led - - platform: group - name: Kitchen main - entities: - - light.ledvance_1 - - light.neo_2 - - light.neo_1 + # - platform: group + # name: Kitchen main + # entities: + # - light.ledvance_1 + # - light.neo_2 + # - light.neo_1 - - platform: group - name: Kitchen secondary - entities: - - light.hue_ambiance_1 - - light.hue_ambiance_2 - - light.hue_ambiance_3 - - light.hue_ambiance_4 + # - platform: group + # name: Kitchen secondary + # entities: + # - light.hue_ambiance_1 + # - light.hue_ambiance_2 + # - light.hue_ambiance_3 + # - light.hue_ambiance_4 - platform: group name: Kitchen @@ -61,17 +127,17 @@ light: - light.kitchen_main - light.kitchen_secondary - - platform: group - name: Hallway entrance - entities: - - light.hue_white_1 - - light.hue_white_2 + # - platform: group + # name: Hallway entrance + # entities: + # - light.hue_white_1 + # - light.hue_white_2 - - platform: group - name: Hallway main - entities: - - light.hue_white_3 - - light.hue_1 + # - platform: group + # name: Hallway main + # entities: + # - light.hue_white_3 + # - light.hue_1 - platform: group name: Hallway @@ -103,6 +169,80 @@ light: - light.kitchen - light.hallway +automation: + - alias: Lighting · Sync Kitchen Main states + trigger: + platform: state + entity_id: light.kitchen_main + action: + - delay: "00:00:03" + - service: mqtt.publish + data: + topic: "z2m_deconz/neo_1/get" + payload: "" + - service: mqtt.publish + data: + topic: "z2m_deconz/neo_2/get" + payload: "" + - service: mqtt.publish + data: + topic: "z2m_deconz/ledvance_1/get" + payload: "" + + - alias: Lighting · Sync Kitchen Secondary states + trigger: + platform: state + entity_id: light.kitchen_secondary + action: + - delay: "00:00:03" + - 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: "" + + - alias: Lighting · Sync Hallway Main states + trigger: + platform: state + entity_id: light.hallway_main + action: + - delay: "00:00:03" + - service: mqtt.publish + data: + topic: "z2m_deconz/hue_white_3/get" + payload: "" + - service: mqtt.publish + data: + topic: "z2m_deconz/hue_1/get" + payload: "" + + - alias: Lighting · Sync Hallway Entrance states + trigger: + platform: state + entity_id: light.hallway_main + action: + - delay: "00:00:03" + - service: mqtt.publish + data: + topic: "z2m_deconz/hue_white_1/get" + payload: "" + - service: mqtt.publish + data: + topic: "z2m_deconz/hue_white_2/get" + payload: "" + + homeassistant: customize: light.ceiling: diff --git a/config/packages/modules/lighting/setup/mqtt.yaml b/config/packages/modules/lighting/setup/mqtt.yaml index fe5317a..4ea7ba1 100644 --- a/config/packages/modules/lighting/setup/mqtt.yaml +++ b/config/packages/modules/lighting/setup/mqtt.yaml @@ -575,42 +575,6 @@ automation: platform: homeassistant event: start action: - - service: mqtt.publish - data: - topic: "z2m_deconz/osram_1/get" - payload: "" - - service: mqtt.publish - data: - topic: "z2m_deconz/osram_2/get" - payload: "" - - service: mqtt.publish - data: - topic: "z2m_deconz/osram_3/get" - payload: "" - - service: mqtt.publish - data: - topic: "z2m_deconz/osram_4/get" - payload: "" - - service: mqtt.publish - data: - topic: "z2m_deconz/osram_5/get" - payload: "" - - service: mqtt.publish - data: - topic: "z2m_deconz/osram_6/get" - payload: "" - - service: mqtt.publish - data: - topic: "z2m_deconz/osram_7/get" - payload: "" - - service: mqtt.publish - data: - topic: "z2m_deconz/osram_8/get" - payload: "" - - service: mqtt.publish - data: - topic: "z2m_deconz/osram_9/get" - payload: "" - service: mqtt.publish data: topic: "z2m_deconz/hue_white_1/get" @@ -619,11 +583,75 @@ automation: data: topic: "z2m_deconz/hue_white_2/get" payload: "" + - service: mqtt.publish + data: + topic: "z2m_deconz/hue_white_3/get" + payload: "" + - service: mqtt.publish + data: + topic: "z2m_deconz/hue_white_4/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_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/ledvance_1/get" payload: "" + - service: mqtt.publish + data: + topic: "z2m_deconz/neo_1/get" + payload: "" + - service: mqtt.publish + data: + topic: "z2m_deconz/neo_2/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: "" diff --git a/config/packages/modules/lighting/temperature.yaml b/config/packages/modules/lighting/temperature.yaml index a8c0637..29b2934 100644 --- a/config/packages/modules/lighting/temperature.yaml +++ b/config/packages/modules/lighting/temperature.yaml @@ -4,11 +4,9 @@ automation: trigger: platform: state entity_id: - # If the lights are listed by groups, turning on 1 light always turns on the others in the group. - - light.light_le_1 - - light.light_le_2 - - light.light_le_3 - - light.light_le_4 + - light.kitchen_secondary + - light.master_bedroom_main + - light.living_room_main to: "on" action: - service: light.turn_on @@ -26,8 +24,7 @@ automation: entity_id: - light.master_bedroom_main - light.living_room_main - - light.kitchen - - light.hallway + - light.kitchen_secondary color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}" - service: logbook.log data_template: