Remove light strip from sunset lighting, it is motion-controlled now

This commit is contained in:
2024-01-13 14:17:58 -05:00
parent e099fddb02
commit 80e03d8b1d

View File

@ -61,18 +61,6 @@ if (upBathOcc === 'off') {
lightsOff.push("light.upstairs_bathroom_lights") lightsOff.push("light.upstairs_bathroom_lights")
} }
// Stairwell light strip settings
let stairKelvin = {}
let stairBrt = {}
let stairEntity = ["light.stairwell_led_strip"]
if (time === 'day') {
stairKelvin = 4000
stairBrt = 255
} else if (time === 'night') {
stairKelvin = 2000
stairBrt = 150
}
// Sunset lights timer settings // Sunset lights timer settings
let timerEntity = ["timer.sunset_lighting_timer"] let timerEntity = ["timer.sunset_lighting_timer"]
let timerDuration = "00:30:00" let timerDuration = "00:30:00"
@ -147,28 +135,6 @@ let sendLights = {
} }
} }
let sendStairwellScript = {
"payload": {
"domain": "script",
"service": "stairwell_led_strip",
"data": {
"color_temp_kelvin": stairKelvin,
"brightness": stairBrt
}
}
}
let sendStairwellOff = {
"payload": {
"domain": "light",
"service": "turn_off",
"target": {
"entity_id": stairEntity
},
"data": {}
}
}
let sendSleepOff = { let sendSleepOff = {
"payload": { "payload": {
"domain": "switch", "domain": "switch",
@ -342,8 +308,6 @@ node.log("----- Time-based Automations: Set Parameters")
node.log("time: " + time) node.log("time: " + time)
node.log("topic: " + topic) node.log("topic: " + topic)
node.log("lightsOff: " + lightsOff) node.log("lightsOff: " + lightsOff)
node.log("stairKelvin: " + stairKelvin)
node.log("stairBrt: " + stairBrt)
node.log("holidayMode: " + holidayMode) node.log("holidayMode: " + holidayMode)
node.log("eventCall: " + eventCall) node.log("eventCall: " + eventCall)
if (time === 'night') { if (time === 'night') {
@ -364,7 +328,7 @@ if (vacation === 'off') {
node.status({fill:"green",shape:"dot",text:"Sunrise Flow"}) node.status({fill:"green",shape:"dot",text:"Sunrise Flow"})
node.send([null,[sendLights,sendBooleanOff],sendStairwellScript,sendExtraLights]) node.send([null,[sendLights,sendBooleanOff],sendStairwellScript,sendExtraLights])
setTimeout(() => { setTimeout(() => {
node.send([null,[sendStairwellOff,sendSleepOff,sendAdaptive,sendSceneResetMain,sendSceneResetDesk],null,null]) node.send([null,[sendSleepOff,sendAdaptive,sendSceneResetMain,sendSceneResetDesk],null,null])
if (holidayMode === 'on' && holidayHold === 'off') { if (holidayMode === 'on' && holidayHold === 'off') {
node.send([null,[sendHoliday],null,null]) node.send([null,[sendHoliday],null,null])
} }