Xiaomi Human / Body / Motion Sensor - Timeout

- id: '1578279316231'
  alias: Reset Sensor state
  description: ''
  trigger:
  - entity_id: binary_sensor.stairs
    for: 00:00:05
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data_template:
      entity_id: binary_sensor.stairs
      state: 'off'
    service: python_script.set_state

The Set State script can be found here
https://github.com/rodpayne/home-assistant/blob/77293b434ca30acff1b43d6ec81374061950e34b/.homeassistant/python_scripts/set_state.py

8 Likes