Update
This commit is contained in:
parent
3a2a6146b6
commit
a426b62d4a
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "c3c-knx-presence",
|
"name": "c3c-knx-presence",
|
||||||
"version": "0.0.228",
|
"version": "0.0.232",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "c3c-knx-presence",
|
"name": "c3c-knx-presence",
|
||||||
"version": "0.0.228",
|
"version": "0.0.232",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@ -35,5 +35,5 @@
|
|||||||
"postinstall": "npm run install-control4-utils && npm run driver-manager",
|
"postinstall": "npm run install-control4-utils && npm run driver-manager",
|
||||||
"test": "busted tests/test.lua"
|
"test": "busted tests/test.lua"
|
||||||
},
|
},
|
||||||
"version": "0.0.228"
|
"version": "0.0.232"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,10 +12,13 @@
|
|||||||
|
|
||||||
if state.newVal == 1 then
|
if state.newVal == 1 then
|
||||||
time = os.date("*t")
|
time = os.date("*t")
|
||||||
if C3C.Lib.State.DayTime.IsDay() or (time.hour >= 7 and time.hour <= 22) 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 primary light", ctx)
|
||||||
C3C.KnxAddresses.Get("Switch LF Hallway CTRL"):Send(1)
|
C3C.KnxAddresses.Get("Switch LF Hallway CTRL"):Send(1)
|
||||||
else
|
elseif time.hour == 20 then
|
||||||
|
C3C.Logger.Debug("Switching on primary light with dimmed control during evening", ctx)
|
||||||
|
C3C.KnxAddresses.Get("Dimmer LF Hallway"):Send(10)
|
||||||
|
else
|
||||||
C3C.Logger.Debug("Switching on primary light with dimmed control during nighttime", ctx)
|
C3C.Logger.Debug("Switching on primary light with dimmed control during nighttime", ctx)
|
||||||
C3C.KnxAddresses.Get("Dimmer LF Hallway"):Send(2)
|
C3C.KnxAddresses.Get("Dimmer LF Hallway"):Send(2)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -120,16 +120,18 @@
|
|||||||
time = os.date("*t")
|
time = os.date("*t")
|
||||||
|
|
||||||
if lux < 50 then
|
if 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 primary light", ctx)
|
||||||
C3C.KnxAddresses.Get("Switch UF Bathroom Primary CTRL"):Send(1)
|
C3C.KnxAddresses.Get("Switch UF Bathroom Primary CTRL"):Send(1)
|
||||||
C3C.KnxAddresses.Get("Switch UF Bathroom Primary Light 1"):Send(1)
|
C3C.KnxAddresses.Get("Switch UF Bathroom Primary Light 1"):Send(1)
|
||||||
C3C.KnxAddresses.Get("Switch UF Bathroom Primary Light 2"):Send(1)
|
C3C.KnxAddresses.Get("Switch UF Bathroom Primary Light 2"):Send(1)
|
||||||
elseif time.hour > 19 and time.hour <= 20 then
|
elseif time.hour == 20 then
|
||||||
C3C.Logger.Debug("Switching on primary light with dimmed control during nighttime", ctx)
|
C3C.Logger.Debug("Switching on primary light with dimmed control during evening", ctx)
|
||||||
C3C.KnxAddresses.Get("Switch UF Bathroom Primary CTRL"):Send(1)
|
|
||||||
C3C.KnxAddresses.Get("Dimmer UF Bathroom Primary"):Send(12)
|
C3C.KnxAddresses.Get("Dimmer UF Bathroom Primary"):Send(12)
|
||||||
end
|
else
|
||||||
|
C3C.Logger.Debug("Switching on primary light with dimmed control during nighttime", ctx)
|
||||||
|
C3C.KnxAddresses.Get("Dimmer UF Bathroom Primary"):Send(2)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
C3C.Logger.Debug("Firing event: UpperFloorBathroomMediaStart", ctx)
|
C3C.Logger.Debug("Firing event: UpperFloorBathroomMediaStart", ctx)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user