Hi guys! Absolute newbie to HA here, just trying to make my home a little smarter one step at a time
I’ve read a ton of topics on this forum on this subject (especially this one seems relevant: How to manually set state/value of sensor? - #9 by rodpayne), but I just cannot seem to make it work.
I recently bought a tuya based smart motion sensor (from Kruidvat in the Netherlands). What I want to do is have the motion sensor trigger certain RGB lights in the bedroom. This works in the Tuya app (which is otherwise very limited regarding timing), but I want this done in HA (thus giving me more options). Motion is detected as it should according to the Tuya app (motion is detected and then immediately rectified so that new motion can be detected)
I have succesfully added the motion sensor to HA, but the sensor is constantly stuck in a ‘detected’ state and thus does not trigger the automation I want. I can manually set the state to ‘none’ in the developer options, but this only works once (until motion is detected).
According to the aforementioned topic, it should be possible to force the state of the motion sensor to ‘none’ (or ‘off’) after a set time (say 2 seconds) by means of a python script. However, as a newbie, all this information is rather overwhelming and I have no idea how to run the script and automations as set out in the abovementioned topic.
Thus far, I have been able to activate python scripts in the config.yaml and I have copied the text of the script in a new file and saved in the relevant folder (I run HA via docker on Synology). After this, I am completely lost as I havent been able to make the automation work despite trying for several hours.
Is there somebody who could help me step-by-step to get this to work? Any help would be greatly appreciated!