Hi,
No matter how good the software and hardware is there is often a failure.
Say my Xiaomi motion Sensor is set to trigger a Tuya switch to turn on.
It works 90% of the time. But sometimes it does’nt due to an update or a network issue.
Any ideas to how to force a recheck every hour and make sure the light is off when there is no movement in the motion sensor.
Sometimes my lights are still on all night because of this, any solutions?
This will turn off the light if it has been on for 3 minutes, or if that is missed for some reason it will also check every hour and if the light has been on for at least 3 minutes it will switch off.
- alias: Kitchen Lights OFF
trigger:
- platform: state
entity_id: binary_sensor.motion_sensor_158d0002732727
to: 'off'
for:
minutes: 3
- platform: time_pattern
hours: "/1"
condition:
condition: state
entity_id: switch.36418502807d3a3f88aa_1
state: 'on'
for:
minutes: 3
action:
service: switch.turn_off
entity_id: switch.36418502807d3a3f88aa_1
Configuration invalidCHECK CONFIG
Invalid config for [automation]: extra keys not allowed @ data['trigger'][0]['minutes']. Got None offset None should be format 'HH:MM' or 'HH:MM:SS' for dictionary value @ data['trigger'][0]['for']. Got None. (See /config/configuration.yaml, line 108). Please check the docs at https://home-assistant.io/integrations/automation/ Invalid config for [automation]: extra keys not allowed @ data['trigger'][0]['minutes']. Got None offset None should be format 'HH:MM' or 'HH:MM:SS' for dictionary value @ data['trigger'][0]['for']. Got None. (See /config/configuration.yaml, line 108). Please check the docs at https://home-assistant.io/integrations/automation/