Minor adjustment in sharkiq, webostv, ws66i (#94611)

This commit is contained in:
Erik Montnemery 2023-06-14 21:41:32 +02:00 committed by GitHub
parent 5c3ec8774d
commit fc068f878b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -69,6 +69,7 @@ class SharkVacuumEntity(CoordinatorEntity[SharkIqUpdateCoordinator], StateVacuum
_attr_fan_speed_list = list(FAN_SPEEDS_MAP)
_attr_has_entity_name = True
_attr_name = None
_attr_supported_features = (
VacuumEntityFeature.BATTERY
| VacuumEntityFeature.FAN_SPEED
@ -87,7 +88,6 @@ class SharkVacuumEntity(CoordinatorEntity[SharkIqUpdateCoordinator], StateVacuum
"""Create a new SharkVacuumEntity."""
super().__init__(coordinator)
self.sharkiq = sharkiq
self._attr_name = None
self._attr_unique_id = sharkiq.serial_number
self._serial_number = sharkiq.serial_number

View File

@ -116,13 +116,13 @@ class LgWebOSMediaPlayerEntity(RestoreEntity, MediaPlayerEntity):
_attr_device_class = MediaPlayerDeviceClass.TV
_attr_has_entity_name = True
_attr_name = None
def __init__(self, entry: ConfigEntry, client: WebOsClient) -> None:
"""Initialize the webos device."""
self._entry = entry
self._client = client
self._attr_assumed_state = True
self._attr_name = None
self._device_name = entry.title
self._attr_unique_id = entry.unique_id
self._sources = entry.options.get(CONF_SOURCES)

View File

@ -45,6 +45,7 @@ class Ws66iZone(CoordinatorEntity[Ws66iDataUpdateCoordinator], MediaPlayerEntity
"""Representation of a WS66i amplifier zone."""
_attr_has_entity_name = True
_attr_name = None
def __init__(
self,
@ -64,7 +65,6 @@ class Ws66iZone(CoordinatorEntity[Ws66iDataUpdateCoordinator], MediaPlayerEntity
self._status: ZoneStatus = coordinator.data[data_idx]
self._attr_source_list = ws66i_data.sources.name_list
self._attr_unique_id = f"{entry_id}_{self._zone_id}"
self._attr_name = None
self._attr_supported_features = (
MediaPlayerEntityFeature.VOLUME_MUTE
| MediaPlayerEntityFeature.VOLUME_SET