Motion lighting for more rooms

This commit is contained in:
2024-02-08 22:14:42 -05:00
parent e58ee15b31
commit fc12a017dd
5 changed files with 87 additions and 2 deletions

View File

@ -3,11 +3,13 @@ const earlyNightMode = states['binary_sensor.early_night_mode'].state
const nightMode = states['input_boolean.night_mode'].state
const goodnight = states['input_boolean.goodnight'].state
const masterBedroomSleep = states['input_boolean.master_bedroom_sleeping'].state
const kallenBedroomSleep = states['input_boolean.kallen_sleeping'].state
const peopleSleeping = (masterBedroomSleep === 'on' || kallenBedroomSleep === 'on')
let hallwayScene = {}
let hallwayAction = {}
if (goodnight === 'on' || masterBedroomSleep === 'on') {
if (goodnight === 'on' || peopleSleeping === true) {
hallwayAction = 'off'
} else if (earlyNightMode === 'on' || nightMode === 'on') {
hallwayAction = 'on'