Added hue groups for kitchen and living room lights controlled by hue switch
All checks were successful
Build and deploy / Build application (push) Successful in 3m50s
Build and deploy / Build container (push) Successful in 1m21s
Build and deploy / Deploy container (push) Successful in 35s

This commit is contained in:
Dreaded_X 2025-01-28 22:49:37 +01:00
parent 746e19eb8c
commit 68684d9410
Signed by: Dreaded_X
GPG Key ID: FA5F485356B0D2D4

View File

@ -59,6 +59,47 @@ automation.device_manager:add(HueBridge.new({
},
}))
local kitchen_lights = HueGroup.new({
identifier = "kitchen_lights",
ip = hue_ip,
login = hue_token,
group_id = 7,
scene_id = "7MJLG27RzeRAEVJ",
})
automation.device_manager:add(kitchen_lights)
local living_lights = HueGroup.new({
identifier = "living_lights",
ip = hue_ip,
login = hue_token,
group_id = 1,
scene_id = "SNZw7jUhQ3cXSjkj",
})
automation.device_manager:add(living_lights)
local living_lights_relax = HueGroup.new({
identifier = "living_lights",
ip = hue_ip,
login = hue_token,
group_id = 1,
scene_id = "eRJ3fvGHCcb6yNw",
})
automation.device_manager:add(living_lights_relax)
automation.device_manager:add(HueSwitch.new({
name = "Switch",
room = "Living",
client = mqtt_client,
topic = mqtt_z2m("living/switch"),
left_callback = function()
kitchen_lights:set_on(not kitchen_lights:on())
end,
right_callback = function()
living_lights:set_on(not living_lights:on())
end,
right_hold_callback = function()
living_lights_relax:set_on(true)
end,
}))
automation.device_manager:add(LightSensor.new({
identifier = "living_light_sensor",
topic = mqtt_z2m("living/light"),