Fix issues with lux threshold conditions
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
const states = global.get('homeassistant.homeAssistant.states')
|
||||
const lights = states['light.upstairs_bathroom_lights'].state
|
||||
const duration = states['input_number.upstairs_bathroom_motion_off_delay'].state
|
||||
const lux = states['sensor.upstairs_bathroom_illuminance'].state
|
||||
const threshold = states['input_number.upstairs_bathroom_lux_threshold'].state
|
||||
const lux = parseInt(states['sensor.upstairs_bathroom_illuminance'].state)
|
||||
const threshold = parseInt(states['input_number.upstairs_bathroom_lux_threshold'].state)
|
||||
const showerMode = states['input_boolean.shower_mode'].state
|
||||
const payload = msg.payload
|
||||
const newDuration = duration * 60
|
||||
|
Reference in New Issue
Block a user