-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Add model_id and serial_number to onewire device info #135279
Conversation
Hey there @garbled1, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
'name': '05.111111111111', | ||
'name_by_user': None, | ||
'primary_config_entry': <ANY>, | ||
'serial_number': None, | ||
'serial_number': '05.111111111111', |
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.
Is this a serial number or the address?
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.
The variable is device_id
so I'm going to say I don't think it's a serial.
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.
Each device on the bus has a 64-bit serial number, of which eight bits are used as a checksum, thus allowing a "universe" of 256 (over 7.2 × 1016) unique device identities. The least significant byte of the serial number is an eight-bit number that tells the type of the device. The most significant byte is a standard (for the 1-Wire bus) eight-bit CRC.[7]
As a "real" example, we have a device address 12A4EBA000000002
, which is exposed on the bus as 12.A4EBA0000000
- we use
12.A4EBA0000000
as the unique identifier 12
is the family code (=DS2406)A4EBA0000000
is the serial number02
is the CRC
Proposed change
SSIA
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: