Change Aqara devices to behave as a non-default entity on Home Assistant

Hi!

Is there a way to make Aqara devices in Home Assistant have a class that would make them perform “better”?

For example, the Aqara Hub M3 can work as a small security/alarm system in the Aqara app, but I cannot make Home Assistant recognise the M3 as an alarm that I can arm, disarm, etc.

Another example: door sensors are imported into Home Assistant simply as “on/off” binary sensors, so I cannot make them behave like, for example, an open door.

Is there a way to change this?

Has anyone had a similar experience?

Thanks!

2 Likes

How did you connect the Hub M3 to Home Assistant?
Did you use matter or the HomeKit Devices Integration of HA?

The M3 and the M200 were discovered by HA and I just added them through Matter. I wouldn’t like to lose them from Apple Home because that’s what the rest of the family is used to.

Open HACS and look at Alarmo, see if that helps?

I’m not sure what you mean by “perform better”.

“Better” with quotes, for lack of more appropriate words, as if I would be able to change the device class of entities so they would have some different behavior. For example security panels show “all safe” even when a door or window sensor is open.
Hope I’m a bit more clear!

You can change how it’s displayed in the device settings or create a new sensor group change the options.


3 Likes

In addition to what @srl77411 suggested you could try and edit the configuration.yaml and change the device class of your “on/off” binary sensors to door/window

2 Likes

Thanks @srl77411, unfortunately changing the way it’s displayed doesn’t change its behavior, but just how it’s shown. It stays a binary sensor.
Creating a group helper didn’t help either. In fact, creating even a group of 1 binary sensor doesn’t even reflect the on/off state on the helper.

@denis.w, I have yet to go dig into the yaml file. Will try that next.

These sensors came to HA as children of one of the aqara hubs when I added it via the Matter integration.
I start to suspect that adding them as a HomeKit device instead would bring all those proper functionalities along.
Alas, I don’t want to get rid of all these things on Apple Home… I wish there was a workaround!

Apple Home, Aqara Guarding and Home Assistant Alarmo do things a little differently even though they work together. You can arm all three and use all three but that will just drive a person craZy plus there is no need to do that.

For the most part we should pick one and simply use that and adjust everything how you like it.

Apple is never going to expose deep control over anything it’s meant to be basic and simple.

Aqara does a pretty good job giving some flexibility over the Guarding options but also has limits. (10 cameras for example)

Home Assistant will most likely give you the most options but you may have to bypass Apple and Aqara Hubs and go direct to Home Assistant.

2 Likes

Yes, that’s what I’m struggling to sort.
By the way, I’m new to Home Assistant, but I already love it.
Yes, I want to give my family all the basic functionality they can get from Apple Home(they wouldn’t want anything more complicated), but I’m the only “nerdy” in the house and I’d love to get for all of us all the under-the-hood functionality only HA can provide. If it was up to me I would probably ditch Apple Home!
So far I’m hitting a few walls, for example I couldn’t manage to get video stream from the G3 and the G410, as well as my Eufy cameras…
I cannot integrate my Eve Aqua devices either…
Of course I enjoy doing these things, but at the moment I have a rather long list of “to be resolved” :grimacing:

You are on the right track it just takes some trial and error to figure out what works best.

I used Apple Home for the Alarm with Aqara sensors but then it was not enough and had short falls. I switched over to Aqara and used the M1S hub for awhile and found things I did not like and could not do.

I landed on Home Assistant using Alarmo because it had it all including all the flexibility.

If I recall correctly Home Assistant lets you still Arm the system even if a window is left open but does throw out a warning message. It’s been awhile since I’ve done that. Same for an open door or anything else inside of Alarmo that is being monitored.

1 Like

Hi @brachetta , if you connect your M3 via HomeKit, you’ll also get the alarm panel in Home Assistant. The only thing you need to do is disable the child devices in HomeKit, because they will be imported as well. Of course, you can continue using everything through Matter.

This is the only way to get the alarm system from the Aqara Home app into Home Assistant. And the great thing is that they are fully synchronized. So, if you arm/disarm it from Home Assistant, you’ll see the exact same status in Aqara Home, and vice versa.

This is also my setup, and I can confirm that it works 100%.

I’ve been using this system for months now without any issues.

Thanks for this, @gtxteo

But of course to do this I’d need to remove the M3 from its current Apple Home pairing in order to free it, and then I can broadcast it back to it with a Home Assistant homekit bridge.
I reckon this could be an option, but I’d lose all what’s already setup on Apple Home at the moment and would need to start from scratch there… with about 30 devices divided in zones, etc…

Try only with a soft (connection) reset or restart M3, and maybe it will be discovered in Home Assistant.

A device cannot be “owned” by more than one HomeKit bridge.
The only option for what you say here (adding it to HA through HomeKit) is to do so and later create a HK bridge on HA to let Apple home pair with that replication.
That requires to unpair it from Apple home first.