Sorry, it was a typo on post writing when I copied the code, it’s 1 in my code, the toggle function works, but I don’t know how to make it show green when door is open for more than 10 seconds and then work normally again when you close the door, starting with Red.