Skip to content

Comments

Add Mounted device types (1.4)#1137

Merged
agners merged 2 commits intomatter-js:mainfrom
lboue:mounted_devices
May 8, 2025
Merged

Add Mounted device types (1.4)#1137
agners merged 2 commits intomatter-js:mainfrom
lboue:mounted_devices

Conversation

@lboue
Copy link
Contributor

@lboue lboue commented May 2, 2025

Adding the new mounted device types (1.4).

Testing

image

lboue added 2 commits May 2, 2025 22:13
Adding the new Mounted Dimmable load device type
@lboue lboue changed the title Add Mounted Dimmable load device type (1.4) Add Mounted device types (1.4) May 2, 2025
@lboue lboue marked this pull request as ready for review May 2, 2025 20:45
@agners agners added the new-feature New feature or request label May 5, 2025
@marcelveldt
Copy link
Collaborator

Normally we auto generate this with the script

@lboue
Copy link
Contributor Author

lboue commented May 7, 2025

@agners
Copy link
Collaborator

agners commented May 7, 2025

Normally we auto generate this with the script

Hm, I see the generated output from current master generates like this:

class MountedOnOffControl(DeviceType, device_type=0x010F):
    """Mounted On/Off Control."""

    clusters = {
        all_clusters.Groups,
        all_clusters.Identify,
        all_clusters.LevelControl,
        all_clusters.OnOff,
        all_clusters.ScenesManagement,
    }


class MountedDimmableLoadControl(DeviceType, device_type=0x0110):
    """Mounted Dimmable Load Control."""

    clusters = {
        all_clusters.Groups,
        all_clusters.Identify,
        all_clusters.LevelControl,
        all_clusters.OnOff,
        all_clusters.ScenesManagement,
    }

So it is missing these base device type clusters too 🤷

I remember that source XML was always buggy, unfortunately. Since I don't think the clusters have real-world impact right now, I am fine adding those as is (since that is how the XML looks like currently too), and then later on fix the upstream XML. What do you think @marcelveldt .

@agners
Copy link
Collaborator

agners commented May 7, 2025

I've posted it in the SDK repo. It was an oversight on their part.

@lboue nice! That said, our script uses master branch anyways, see https://github.com/home-assistant-libs/python-matter-server/blob/main/scripts/generate_devices.py#L12-L13 😅 In the end, I don't think it is important to have v1.4-branch updated, that XML is not well maintained anyways. IMHO, more important would be to have it correct in master branch.

As for the mounted device types, the base device types and the occupancy sensing are definitly missing. When you look at On/Off light, the optional clusters are there. So this actually needs some updates upstream as well.

Copy link
Collaborator

@agners agners left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is the current state of the device types XML, let's just go with this.

@agners agners merged commit 3756178 into matter-js:main May 8, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants