I’m trying to create a decent, mostly reliable, motion-based room occupancy routine.
I think this should well enough…but:
- I can’t seem to it to restart the timer.
timer.start
should restart a running timer. Bug? (The problem is usually behind the keyboard.) - Has anyone been able to change the default reset time on the xaiomi human body sensor?
timer:
timer_dining:
duration: '00:05:00'
automation:
- alias: Dining Motion Detected
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.motion_sensor_158d000236b201
to: 'on'
condition: []
action:
- service: input_boolean.turn_on
entity_id: input_boolean.dining_occupancy
- service: timer.start
entity_id: timer.timer_dining
The motion detector resets after 2:00 minutes.
- So it turn restarts at 2 and at 4 minutes (1 minute left on the initial timer)
- The timer expires at 5 minutes (one minute later)
- The motion detector is already on…so it doesn’t re-fire the new event for another minute
timer.start
seems like a pretty core part of an automation project…so I’m pretty sure it’s me.