Skip to content

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.

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

2 participants