Add zeroconf ATTR constants#58671
Conversation
|
Hey there @balloob, @frenck, mind taking a look at this pull request as it has been labeled with an integration ( |
|
Hey there @bdraco, mind taking a look at this pull request as it has been labeled with an integration ( |
| ATTR_HOST: Final = "host" | ||
| ATTR_HOSTNAME: Final = "hostname" | ||
| ATTR_NAME: Final = "name" | ||
| ATTR_PORT: Final = "port" | ||
| ATTR_PROPERTIES: Final = "properties" | ||
| ATTR_TYPE: Final = "type" |
There was a problem hiding this comment.
Only three attributes used in this PR:
zeroconfusesATTR_NAMEandATTR_PROPERTIEShueusesATTR_HOSTandATTR_PROPERTIES
But I figured it was best to create all 6 attributes right away,
There was a problem hiding this comment.
We should not create unused constants. That is introducing dead code.
There was a problem hiding this comment.
Noted
I have dropped the extra 3 constants, and will add them back in as and when required.
|
@MartinHjelmare how do you feel about this PR regarding |
MartinHjelmare
left a comment
There was a problem hiding this comment.
Constants here makes sense since it's a fixed interface and each integration does not need to define their own interface.
Proposed change
Add
ATTR_*constants tozeroconf, to be used by the various config flows.Sample use in
hueType of change
Additional information
Checklist
black --fast 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..coveragerc.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: