Fix explicit device naming for integrations a-j (#95619)

Fix explicit device naming for a-j
This commit is contained in:
Joost Lekkerkerker 2023-06-30 17:33:50 +02:00 committed by GitHub
parent beac3c713b
commit 7eb26cb9c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 24 additions and 1 deletions

View File

@ -34,6 +34,7 @@ class AbodeAlarm(AbodeDevice, alarm.AlarmControlPanelEntity):
"""An alarm_control_panel implementation for Abode."""
_attr_icon = ICON
_attr_name = None
_attr_code_arm_required = False
_attr_supported_features = (
AlarmControlPanelEntityFeature.ARM_HOME

View File

@ -39,6 +39,7 @@ class AbodeCamera(AbodeDevice, Camera):
"""Representation of an Abode camera."""
_device: AbodeCam
_attr_name = None
def __init__(self, data: AbodeSystem, device: AbodeDev, event: Event) -> None:
"""Initialize the Abode device."""

View File

@ -29,6 +29,7 @@ class AbodeCover(AbodeDevice, CoverEntity):
"""Representation of an Abode cover."""
_device: AbodeCV
_attr_name = None
@property
def is_closed(self) -> bool:

View File

@ -42,6 +42,7 @@ class AbodeLight(AbodeDevice, LightEntity):
"""Representation of an Abode light."""
_device: AbodeLT
_attr_name = None
def turn_on(self, **kwargs: Any) -> None:
"""Turn on the light."""

View File

@ -29,6 +29,7 @@ class AbodeLock(AbodeDevice, LockEntity):
"""Representation of an Abode lock."""
_device: AbodeLK
_attr_name = None
def lock(self, **kwargs: Any) -> None:
"""Lock the device."""

View File

@ -53,7 +53,6 @@ class AbodeSensor(AbodeDevice, SensorEntity):
"""A sensor implementation for Abode devices."""
_device: AbodeSense
_attr_has_entity_name = True
def __init__(
self,

View File

@ -44,6 +44,7 @@ class AbodeSwitch(AbodeDevice, SwitchEntity):
"""Representation of an Abode switch."""
_device: AbodeSW
_attr_name = None
def turn_on(self, **kwargs: Any) -> None:
"""Turn on the device."""

View File

@ -84,6 +84,8 @@ class AdvantageAirZoneEntity(AdvantageAirAcEntity):
class AdvantageAirThingEntity(AdvantageAirEntity):
"""Parent class for Advantage Air Things Entities."""
_attr_name = None
def __init__(self, instance: AdvantageAirData, thing: dict[str, Any]) -> None:
"""Initialize common aspects of an Advantage Air Things entity."""
super().__init__(instance)

View File

@ -41,6 +41,7 @@ class AdvantageAirLight(AdvantageAirEntity, LightEntity):
"""Representation of Advantage Air Light."""
_attr_supported_color_modes = {ColorMode.ONOFF}
_attr_name = None
def __init__(self, instance: AdvantageAirData, light: dict[str, Any]) -> None:
"""Initialize an Advantage Air Light."""

View File

@ -80,6 +80,7 @@ class AnthemAVR(MediaPlayerEntity):
self._attr_name = f"zone {zone_number}"
self._attr_unique_id = f"{mac_address}_{zone_number}"
else:
self._attr_name = None
self._attr_unique_id = mac_address
self._attr_device_info = DeviceInfo(

View File

@ -221,6 +221,7 @@ class BroadlinkSP2Switch(BroadlinkSP1Switch):
_attr_assumed_state = False
_attr_has_entity_name = True
_attr_name = None
def __init__(self, device, *args, **kwargs):
"""Initialize the switch."""

View File

@ -83,6 +83,7 @@ class BrottsplatskartanSensor(SensorEntity):
_attr_attribution = ATTRIBUTION
_attr_has_entity_name = True
_attr_name = None
def __init__(self, bpk: BrottsplatsKartan, name: str, entry_id: str) -> None:
"""Initialize the Brottsplatskartan sensor."""

View File

@ -71,6 +71,7 @@ class BSBLANClimate(
"""Defines a BSBLAN climate device."""
_attr_has_entity_name = True
_attr_name = None
# Determine preset modes
_attr_supported_features = (
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE

View File

@ -8,6 +8,8 @@ from .devolo_device import DevoloDeviceEntity
class DevoloMultiLevelSwitchDeviceEntity(DevoloDeviceEntity):
"""Representation of a multi level switch device within devolo Home Control. Something like a dimmer or a thermostat."""
_attr_name = None
def __init__(
self, homecontrol: HomeControl, device_instance: Zwave, element_uid: str
) -> None:

View File

@ -41,6 +41,8 @@ async def async_setup_entry(
class DevoloSwitch(DevoloDeviceEntity, SwitchEntity):
"""Representation of a switch."""
_attr_name = None
def __init__(
self, homecontrol: HomeControl, device_instance: Zwave, element_uid: str
) -> None:

View File

@ -47,6 +47,7 @@ async def async_setup_entry(
class ElgatoLight(ElgatoEntity, LightEntity):
"""Defines an Elgato Light."""
_attr_name = None
_attr_min_mireds = 143
_attr_max_mireds = 344

View File

@ -45,6 +45,7 @@ class HomeWizardSwitchEntityDescription(
SWITCHES = [
HomeWizardSwitchEntityDescription(
key="power_on",
name=None,
device_class=SwitchDeviceClass.OUTLET,
create_fn=lambda coordinator: coordinator.supports_state(),
available_fn=lambda data: data.state is not None and not data.state.switch_lock,

View File

@ -101,6 +101,7 @@ class HoneywellUSThermostat(ClimateEntity):
"""Representation of a Honeywell US Thermostat."""
_attr_has_entity_name = True
_attr_name = None
def __init__(
self,

View File

@ -90,6 +90,7 @@ class JellyfinMediaPlayer(JellyfinEntity, MediaPlayerEntity):
sw_version=self.app_version,
via_device=(DOMAIN, coordinator.server_id),
)
self._attr_name = None
else:
self._attr_device_info = None
self._attr_has_entity_name = False

View File

@ -42,6 +42,7 @@ def _count_now_playing(data: JellyfinDataT) -> int:
SENSOR_TYPES: dict[str, JellyfinSensorEntityDescription] = {
"sessions": JellyfinSensorEntityDescription(
key="watching",
name=None,
icon="mdi:television-play",
native_unit_of_measurement="Watching",
value_fn=_count_now_playing,

View File

@ -52,6 +52,8 @@ async def async_setup_entry(
class JvcProjectorRemote(JvcProjectorEntity, RemoteEntity):
"""Representation of a JVC Projector device."""
_attr_name = None
@property
def is_on(self) -> bool:
"""Return True if entity is on."""