core/homeassistant/components/vallox
Arto Jantunen 5cc594682f
Add unique id's to Vallox entities (#58459)
* Add unique id's to Vallox entities

* Cache uuid properties

Requested in code review.

Caching None isn't a problem as the underlying implementation of get_uuid
in the vallox_websocket_api library can never return None.

* Simplify get_uuid type check

Based on review comments.

* Set _attr_unique_id in init

* Import the library get_uuid under a different name

There are a few options here:

1. Rename the get_uuid method with a synonym
2. Import get_uuid under a different name
3. Convert get_uuid into a property
4. Rename get_uuid in the Vallox library

None of these options is that appealing. I'll start with option two,
anyways.
2021-11-15 10:28:19 -06:00
..
__init__.py
const.py
fan.py
manifest.json
sensor.py
services.yaml