Migrate Yolink to has entity name (#96839)

* Migrate Yolink to has entity name

* Add sensor
This commit is contained in:
Joost Lekkerkerker 2023-07-18 13:58:42 +02:00 committed by GitHub
parent 8a9f117bdc
commit 8dc5f73789
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 73 additions and 41 deletions

View file

@ -61,6 +61,8 @@ async def async_setup_entry(
class YoLinkClimateEntity(YoLinkEntity, ClimateEntity):
"""YoLink Climate Entity."""
_attr_name = None
def __init__(
self,
config_entry: ConfigEntry,
@ -69,7 +71,6 @@ class YoLinkClimateEntity(YoLinkEntity, ClimateEntity):
"""Init YoLink Thermostat."""
super().__init__(config_entry, coordinator)
self._attr_unique_id = f"{coordinator.device.device_id}_climate"
self._attr_name = f"{coordinator.device.device_name} (Thermostat)"
self._attr_temperature_unit = UnitOfTemperature.CELSIUS
self._attr_fan_modes = [FAN_ON, FAN_AUTO]
self._attr_min_temp = -10