Use ambient in the bathroom

This commit is contained in:
2026-10-03 01:10:29 +02:00
parent d4fe451788
commit dd22bc5381
+6 -14
View File
@@ -91,9 +91,6 @@
C3C.KnxAddresses.Watch("Switch UF Bathroom Ambient", overrideLight) C3C.KnxAddresses.Watch("Switch UF Bathroom Ambient", overrideLight)
C3C.KnxAddresses.Watch("Switch UF Bathroom Ambient CTRL", overrideLight) C3C.KnxAddresses.Watch("Switch UF Bathroom Ambient CTRL", overrideLight)
C3C.KnxAddresses.Watch("Switch UF Bathroom Ambient Light 1", overrideLight)
C3C.KnxAddresses.Watch("Switch UF Bathroom Ambient Light 2", overrideLight)
C3C.KnxAddresses.Watch("Switch UF Bathroom Ambient Toilet", overrideLight)
C3C.KnxAddresses.Watch("Dimmer UF Bathroom Ambient", overrideLight) C3C.KnxAddresses.Watch("Dimmer UF Bathroom Ambient", overrideLight)
C3C.KnxAddresses.Watch("Dimmer UF Bathroom Ambient Dimming", overrideLight) C3C.KnxAddresses.Watch("Dimmer UF Bathroom Ambient Dimming", overrideLight)
@@ -123,16 +120,14 @@
C3C.Logger.Debug("Light overridden, skipping automatic light control", ctx) C3C.Logger.Debug("Light overridden, skipping automatic light control", ctx)
elseif lux < 50 then elseif lux < 50 then
if C3C.Lib.State.DayTime.IsDay() or (time.hour >= 7 and time.hour <= 19) then if C3C.Lib.State.DayTime.IsDay() or (time.hour >= 7 and time.hour <= 19) then
C3C.Logger.Debug("Switching on primary light", ctx) C3C.Logger.Debug("Switching on ambient light", ctx)
C3C.KnxAddresses.Get("Switch UF Bathroom Primary CTRL"):Send(1) C3C.KnxAddresses.Get("Dimmer UF Bathroom Ambient HSV"):Send(tonumber("2057FF", 16))
C3C.KnxAddresses.Get("Switch UF Bathroom Primary Light 1"):Send(1)
C3C.KnxAddresses.Get("Switch UF Bathroom Primary Light 2"):Send(1)
elseif time.hour == 20 then elseif time.hour == 20 then
C3C.Logger.Debug("Switching on primary light with dimmed control during evening", ctx) C3C.Logger.Debug("Switching on ambient light with dimmed control during evening", ctx)
C3C.KnxAddresses.Get("Dimmer UF Bathroom Primary"):Send(12) C3C.KnxAddresses.Get("Dimmer UF Bathroom Ambient HSV"):Send(tonumber("179442", 16))
else else
C3C.Logger.Debug("Switching on primary light with dimmed control during nighttime", ctx) C3C.Logger.Debug("Switching on ambient light with dimmed control during nighttime", ctx)
C3C.KnxAddresses.Get("Dimmer UF Bathroom Primary"):Send(2) C3C.KnxAddresses.Get("Dimmer UF Bathroom Ambient HSV"):Send(tonumber("E1CF05", 16))
end end
end end
@@ -162,9 +157,6 @@
if gaAmbientLightCTRLFB.Value ~= 0 then if gaAmbientLightCTRLFB.Value ~= 0 then
C3C.Logger.Debug("Switching off ambient light", ctx) C3C.Logger.Debug("Switching off ambient light", ctx)
C3C.KnxAddresses.Get("Switch UF Bathroom Ambient CTRL"):Send(0) C3C.KnxAddresses.Get("Switch UF Bathroom Ambient CTRL"):Send(0)
C3C.KnxAddresses.Get("Switch UF Bathroom Ambient Light 1"):Send(0)
C3C.KnxAddresses.Get("Switch UF Bathroom Ambient Light 2"):Send(0)
C3C.KnxAddresses.Get("Switch UF Bathroom Ambient Toilet"):Send(0)
end end
end end