Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Category of bridged devices is always Other #903

Open
1 task done
burmistrzak opened this issue Jul 3, 2024 · 4 comments
Open
1 task done

[Bug] Category of bridged devices is always Other #903

burmistrzak opened this issue Jul 3, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@burmistrzak
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I was inspecting individual devices exposed through homebridge-z2m, and noticed that all devices have the same HAP accessory category of Other.

This behavior can be attributed to the following line:

const accessory = new this.api.platformAccessory(device.friendly_name, uuid);

Because we're not explicitly specifying an accessory category, a default category is used by Homebridge. I'm not sure how relevant this is for bridged devices, but it might help in cases like #869... 🤔

Related devices

No response

Related Devices

No response

Steps To Reproduce

No response

Expected behavior

No response

Device entry

No response

Status update

No response

Messages from this plugin

No response

This plugin

1.11.0-beta.6

Homebridge

1.7.0

Zigbee2MQTT

1.39.0-dev

Homebridge Config UI X (if applicable)

No response

@burmistrzak burmistrzak added the bug Something isn't working label Jul 3, 2024
@itavero
Copy link
Owner

itavero commented Jul 15, 2024

Any feature request you are proposing?

@burmistrzak
Copy link
Contributor Author

@itavero Sorry for only getting back to you now, been dealing with some health stuff. 😬
Absolutely not high priority, but maybe we can use the Z2M converter type as a hint for the correct accessory category?

@itavero
Copy link
Owner

itavero commented Sep 4, 2024

maybe we can use the Z2M converter type as a hint for the correct accessory category?

Yes, but a single accessory can use multiple converters, so they should somehow have a priority between them.

@burmistrzak
Copy link
Contributor Author

maybe we can use the Z2M converter type as a hint for the correct accessory category?

Yes, but a single accessory can use multiple converters, so they should somehow have a priority between them.

Correct. According to HAP spec, the primary service should be used here.
So if we e.g. have a ceiling fan with a built-in light, Fan is the category to use.
Using the first type of features we see for a given device seems like a good start, because converter devs can choose the order of features in exposes, IIRC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants