t0bst4r / home-assistant-matter-hub

Publish your Home-Assistant Instance using Matter.
Apache License 2.0
166 stars 11 forks source link

[Enhancement] Support a single device with multiple sensors #110

Open librehat opened 2 weeks ago

librehat commented 2 weeks ago

image

Example, my Dyson purifier is now bridged as 3 entities. They show up as 3 separate devices in my SmartThings app. Ideally, this shows up as a single device via Matter that has the capabilities of a switch (for fan control), and humidity and temperature sensors.

In other words, it seems the "device" level abstraction from Home Assistant is missing here

KipK commented 2 weeks ago

Also Google Home won't find Humidity on a separated device if there's alrady a thermostat or a temperature sensor in the same room. It will display the sensor with correct data, but won't find when asking....

By priority it search first thermostat, then temperature sensor, then other device. If one of those is present it then fail to find the data.

t0bst4r commented 2 weeks ago

In other words, it seems the "device" level abstraction from Home Assistant is missing here

Yes, this is a bit more tricky than expected. I'll keep this open for a future change, but maybe that's more a thing for version 4.0.0, since it will also break all already existing configurations because it would reset all devices and give them different unique ids.

Also Google Home won't find Humidity on a separated device if there's alrady a thermostat or a temperature sensor in the same room. It will display the sensor with correct data, but won't find when asking....

By priority it search first thermostat, then temperature sensor, then other device. If one of those is present it then fail to find the data.

Doesn't seem that we can do anything about it?

KipK commented 2 weeks ago

Doesn't seem that we can do anything about it?

Yes, multiple entities on one device. If you have a device exposing temp and hum clusters then it works. I think Google expect to have humidity with temp sensors as they always have for those type of device.

I'm agree it' a bad implementation. I've sent them a feedback about this

That's also why I've featured request to have humidity in thermostats 😉

t0bst4r commented 2 weeks ago

Yes, it makes sense for climates, but they also have it in one entity.

Imaginary Szenario:

User has a device "my device" in HA with the following entities

  • switch.my_device
  • sensor.my_device_temperature
  • sensor.my_device_humidity
  • light.my_device_light
  • binary_sensor.my_device_open

This device could be anything. Let’s say a door sensor with temp, humidity and light included. I don’t know why, but we don‘t know all possible devices manufacturers could build.

The Problem: Matter needs a single device type. Devices must only define clusters which are allowed in their "mandatory" or "optional" list. Additionally it does not make sense to add a levelControl to a sensor device to control its light’s brightness. So one device to combine all related entities will not be enough.

The solution: As far as I understood: In matter we‘d need an extra aggregator device (device type: aggregator) which includes multiple nested devices (one per entity). That's totally possible, but quite some change in the code base that I am not sure when to do. And the more I wait, the more users will hate me on release date when they need to re-configure all their rooms in Alexa 😂

KipK commented 2 weeks ago

There's many Matter device on the specs with multiple clusters that would match on HA with multiple entities

from matter-1-3-device-library-specification.pdf

as example, 7.10. Air Quality Sensor

image

Imagine the mess with all those entities separated on your Alexa or GH :)

nicoodeimos commented 2 weeks ago

Just wanted to support this idea too, this would be the best feature ever! Grouping entities into a single « device » could be game changer compared to Home Assistant HomeKit bridge witch sadly doesn’t allow nested accessories (although it is perfectly supported in the protocol and Home app)!

image

Pleeeeease make this happen!

ThatBlockyPenguin commented 1 week ago

I also would love this! I get that it's a lot of work and a big change, but if it's feasible at some point in the future, that's fantastic!

ChaotenKurt commented 6 days ago

I agree, it would be great if a device could have multiple entities. For example, if sockets could then directly display the power consumption later on. Or, for example, my Aqara window contact also has a built-in temperature sensor. It would be ideal if you could simply import the entire device at once with the “Include Label”. Nevertheless, many thanks for the excellent work so far.