-
Notifications
You must be signed in to change notification settings - Fork 6
Add Home Assistant device grouping for Lupusec sensors #93
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
Conversation
|
@CyberDNS 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: CyberDNS <34795406+CyberDNS@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot
Not bad, but I think it should work also for other Lupusec devices, so I would suggest to rather create only one device type "Lupusec" or we have to find a way how to detect the right version.
CyberDNS
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot
Not bad, but I think it should work also for other Lupusec devices, so I would suggest to rather create only one device type "Lupusec" or we have to find a way how to detect the right version.
Co-authored-by: CyberDNS <34795406+CyberDNS@users.noreply.github.com>
You're absolutely right! I've updated the implementation to be generic and work with all Lupusec models. The changes include:
This makes the device grouping compatible with all the supported models mentioned in the README (XT1 Plus, XT2, XT2 Plus) without needing device detection logic. Changes committed in d701ba3.
Done! I've made the device grouping generic to work with all Lupusec models. The device name is now simply "Lupusec" instead of "Lupus XT1 Plus", and the identifier has been changed to This means whether users have an XT1 Plus, XT2, or XT2 Plus, all their devices will be properly grouped under the same "Lupusec" device in Home Assistant. Changes committed in d701ba3. |
This PR implements Home Assistant device grouping for all Lupusec sensors and devices to improve organization and discoverability in the Home Assistant UI.
Problem
Previously, each Lupusec sensor (motion detectors, temperature sensors, door/window contacts, etc.) appeared as individual entities in Home Assistant without any logical grouping. This made it difficult to:
Solution
Added Home Assistant device discovery support that groups all Lupusec sensors under a single "Lupusec" device. This is achieved by:
DeviceInfoproperty andDeclareDeviceInfo()method to support device metadataDeclareLupusecDevice()helper method that declares consistent device info:lupusecLupusecLupus ElectronicsResult
All Lupusec entities now appear grouped under a single "Lupusec" device in Home Assistant, making them much easier to find and manage. This works with all supported Lupusec models (XT1 Plus, XT2, XT2 Plus).
Example Discovery Payload
{ "name": "Living Room - Temperature", "unique_id": "TEMP001TEMPERATURE", "device_class": "temperature", "state_topic": "homeassistant/sensor/lupusec/TEMP001TEMPERATURE/state", "device": { "identifiers": ["lupusec"], "name": "Lupusec", "manufacturer": "Lupus Electronics" } }This change is backward compatible and doesn't affect existing functionality - it only adds the device grouping information to improve the Home Assistant user experience.
Fixes #92.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.