Automation 2.0, lesson 19, creating On/Off automations for the U200 lock (and similar ones) using a wireless button

Lesson 18_Automation 2.0, lesson 18, creating temperature control automation using air conditioning

Good afternoon.
Today I want to show an example of creating automation for turning the lock on and off using a wireless button (H2 dual-channel switch) or any other. The U200 lock and others do not have the closed/open conditions in the IF section. This problem causes misunderstanding of the process among non-advanced users.
Let’s get started.
The first part.
We create a virtual switch for the U200 door lock. You can see the description in this lesson. Automation 2.0, lesson 12, blitz topic, VIRTUAL Aqara switch .
We have such automation as in the picture. You can make any other automation that will never work, this is a millet trigger (virtual switch), use any other devices for this. We will turn it on and off by command, that’s why it is called virtual. I have shown it as an example.
Fig.1.


The second part.
We create automation that will turn on/off the virtual switch (which I described in the first part) depending on the state of the door lock. Everything is on the screen.
Fig.2.



The third part.
We create automation that will open/close the door lock using the wireless button of the H2 switch. Everything is quite simple here, in the IF section we use information about the state of the lock using the virtual switch.
Everything is on the screen.
Fig.3.



This completes the automation setup. Please note that this automation is local, which ensures its operation without the Internet (emergency option).
This is where I will end this lesson.
Thank you for reading and sharing the topic (you can also share it on other platforms with a link to our forum).
More to come.

Lesson 19(2)__Automation 2.0 continuation of lesson 19. Open/closed status information for the Aqara U200 lock (as well as locks of all types of Aqara)

10 Likes

I followed every step as in the photo attached, it closes the door, but not opening :slightly_frowning_face:

Let’s start by checking the operation of the virtual switch. If you manually close/open the U200, does the virtual switch work (change state)?
Additional question, is the switch connected to the Aqara gateway? I see you are using Thread.

2 Likes

My recommendation, turn on the H2 switch in Zigbee mode.

1 Like

I’ll be home and repeat your situation in Thread mode. I’ll reply tomorrow.

2 Likes

The automation is working as is should. Most important thing, change the automation names as you create them, DO NOT let the default name. I have tried for several hours, assisted by @gafich10 to find out why is not working, and thanks to him, seeing the problem, i have deleted all automations and re-create them with the identical names as in the lesson, and now everything work like a charm. Thanks again to @gafich10 for all the time spent.

3 Likes

Hello, I hope you won’t create new automations for other switches. You just need to supplement these automations with new switches. You can also add an indication (supplement to the THEN automation) about the open door, for example, a blinking lamp when the door is open after pressing, or a sound file “doors open”.


1 Like

I was actually made new automation with other switch, but now after I read your post, I just delete them and add another switch in the initial one :smiley:
Thanks again for all the ideas you share


3 Likes