Updated extractor fan in the bathroom
By pairing each device with a local ZigBee hub on the home assistant, the automations that were created earlier stopped working. This is logical, the triggers for such automations were ZigBee devices, and now they are not in the old system. Let’s start transferring automations one by one…
Original of this article is here. This is a translation of my article in Zen. Also, do not forget to read us in other services: Instagram, telegram (RU, EN, DE). Medium, LiveJournal, YouTube.
If you missed the first part of the article, I recommend reading it again to refresh the details (RU). The fan was turned on for 10 minutes when the large toilet button was activated. At the same time, pressing the button again reset this timer, i.e. the automation was started again. It is important.
1.1. To create a similar script, we go to settings → automation.
1.2. Then click on the blue button “+ add automation”
1.3. In the next window, select “start with an empty automation”
The page for creating a new automation opens.
2.1. As in the previous examples, we come up with a name and description of automation. I put the name of the room in the first word. Description-this item is optional, but I recommend filling it out to understand and remember the details of this automation in a couple of years.
2.2. As a trigger, we select our window closing sensor (which is installed inside the button) and the “closing” state.
2.3. Now let’s go below to the “Actions”. In the first line, we will select “Device”, in the second we will select our fan (in my case, this is the second relay channel).
2.4. Then click “add actions” and select “Delay”. We select the required time. In the current example it is 10 minutes.
2.5. The last action turns off the fan. Select “Device”, the control device and “turn off”
2.6. Click “save” and go to check. We make sure that everything works.
At the beginning, it seemed to me that automation works the same way as in “mi home”. But later it became clear that there is one important difference. After activating the script, pressing the button again does not restart the automation. After activating the script, pressing the button again does not restart the automation. I didn’t understand whether this is good or bad for the current example. This may affect some automations negatively, and others will start working better. But more about this in the following articles.
And that’s all, subscribe, likes, repost…