Skip to content

fix: correct unique_id generation for KegSensor and KegOnlineStatusSensor#10

Merged
stuartp44 merged 1 commit intomainfrom
stu/fix_id_issue
Feb 6, 2026
Merged

fix: correct unique_id generation for KegSensor and KegOnlineStatusSensor#10
stuartp44 merged 1 commit intomainfrom
stu/fix_id_issue

Conversation

@stuartp44
Copy link
Owner

@stuartp44 stuartp44 commented Jan 31, 2026

This pull request makes small improvements to the KegSensor class in custom_components/minibrew/sensor.py to ensure consistent use of the device identifier and simplify the generation of unique IDs.

Most important changes:

Device identifier consistency:

  • The __init__ method now sets self.device to the passed device object, ensuring it is available throughout the class.

Unique ID generation:

  • The unique_id property now consistently uses self.device_id instead of directly accessing self.device.serial_number, simplifying the code and reducing redundancy. [1] [2]

Closes #9

@stuartp44 stuartp44 self-assigned this Jan 31, 2026
@stuartp44 stuartp44 added the preview-release Creates a preview release label Jan 31, 2026
@github-actions
Copy link
Contributor

Preview Release Created

A preview release has been created for testing this PR.

Version: 0.6.0-preview.10.f7ccb10
Release: https://github.com/stuartp44/hambrewclient/releases/tag/v0.6.0-preview.10.f7ccb10

How to Test

  1. Go to the draft release
  2. Download minibrew-0.6.0-preview.10.f7ccb10.zip
  3. Extract to your Home Assistant custom_components directory
  4. Restart Home Assistant
  5. Test the changes and report back here

Or install directly via HACS:

# Add custom repository in HACS:
https://github.com/stuartp44/hambrewclient

# Then select version: 0.6.0-preview.10.f7ccb10

WARNING: This is a preview release - do not use in production!

Once testing is complete and approved, this PR can be merged for an official release.

@stuartp44 stuartp44 merged commit 38639c6 into main Feb 6, 2026
7 checks passed
@stuartp44 stuartp44 deleted the stu/fix_id_issue branch February 6, 2026 18:11
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

🧹 Cleaned up 1 preview release(s) for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview-release Creates a preview release preview-released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error adding entity None for domain sensor with platform minibrew

1 participant