Use dataclass properties in nanoleaf discovery#60580
Use dataclass properties in nanoleaf discovery#60580bdraco merged 3 commits intohome-assistant:devfrom
Conversation
|
Hey there @milanmeu, mind taking a look at this pull request as it has been labeled with an integration ( |
|
@milanmeu I did not update core/homeassistant/components/nanoleaf/config_flow.py Lines 119 to 123 in 0e3a229 For the tests, I assumed it was core/tests/components/nanoleaf/test_config_flow.py Lines 465 to 472 in 0e3a229 If you do not have the opportunity to check it, then I suggest that we merge it as it is to avoid blocking #60561, and let the warning kick in when #60540 is merged. |
|
According to the documentation, these come from the SSDP headers. |
|
I can adjust the tests for |
|
Note: this PR is required for #60561 |
|
SsdpServiceInfoSsdpServiceInfo(
upnp={'UDN': 'uuid:f3e5a62e-7b85-4a94-a010-82797490743b'},
ssdp_usn='uuid:f3e5a62e-7b85-4a94-a010-82797490743b',
ssdp_st='nanoleaf:nl29',
ssdp_location='http://:16021',
ssdp_nt=None,
ssdp_udn='uuid:f3e5a62e-7b85-4a94-a010-82797490743b',
ssdp_ext='',
ssdp_server=None,
ssdp_headers={
'S': 'uuid:f3e5a62e-7b85-4a94-a010-82797490743b',
'Ext': '',
'Cache-Control': 'no-cache="Ext",
max-age = 60',
'ST': 'nanoleaf:nl29',
'USN': 'uuid:f3e5a62e-7b85-4a94-a010-82797490743b',
' nl-deviceid': '5E:2E:EA:4B:FA:F1',
'nl-devicename': 'Canvas ADF9',
'_location_original': 'http://:16021',
'location': 'http://:16021',
'_timestamp': datetime.datetime(2021, 11, 30, 11, 5, 41, 185416),
'_host': '192.168.0.236',
'_port': 1900,
'_udn': 'uuid:f3e5a62e-7b85-4a94-a010-82797490743b'
},
x_homeassistant_matching_domains={'nanoleaf'},
_warning_logged=False
) |
|
That's perfect. I've adjusted the tests and the code to take this into account. |

Proposed change
Use dataclass properties in
nanoleafdiscovery.Linked to #60540
Type 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: