WIP: add model and serial to caseta devices#14037
WIP: add model and serial to caseta devices#14037mdonoughe wants to merge 3 commits intohome-assistant:devfrom
Conversation
| @property | ||
| def unique_id(self): | ||
| """Return the unique ID of the device (model + serial).""" | ||
| return "{}.{}".format(self._device_model, self._device_serial) |
There was a problem hiding this comment.
Wouldn't a serial be enough to provide a unique id?
There was a problem hiding this comment.
Probably. I don't know if it's the serial number for that model or the serial number for all devices they've produced. It's just an integer value.
There was a problem hiding this comment.
It must be the serial for the devices. Let's stick with just the serial.
There was a problem hiding this comment.
I'm worried about the super improbable case where somebody buys both dimmer switch 1234 and binary switch 1234, but probably serial is fine.
|
This does seem to work. I've created a Docker image |
| return self._device_name | ||
|
|
||
| @property | ||
| def model(self): |
There was a problem hiding this comment.
This property can be removed now.
|
@mdonoughe Any updates on this PR? |
|
It needs a new release of pylutron_caseta before it will work. |
|
Let's close this PR and you can open a new one when a new release has been done. |
Description:
This depends on gurumitts/pylutron-caseta#25 which has not been merged yet, and I have not actually tested it on my environment yet.
This should add model numbers and serial numbers to lutron_caseta devices and enable the entity registry.
Related issue (if applicable): N/A
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for
configuration.yaml(if applicable): N/AChecklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.If the code does not interact with devices: