Skip to content

Commit

Permalink
Fix explicit device naming for integrations a-j (#95619)
Browse files Browse the repository at this point in the history
Fix explicit device naming for a-j
  • Loading branch information
joostlek authored and balloob committed Jun 30, 2023
1 parent a8807f6 commit 70d3dc2
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions homeassistant/components/abode/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/abode/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/abode/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class AbodeCover(AbodeDevice, CoverEntity):
"""Representation of an Abode cover."""

_device: AbodeCV
_attr_name = None

@property
def is_closed(self) -> bool:
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/abode/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/abode/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/abode/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class AbodeSensor(AbodeDevice, SensorEntity):
"""A sensor implementation for Abode devices."""

_device: AbodeSense
_attr_has_entity_name = True

def __init__(
self,
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/abode/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/advantage_air/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def _zone(self) -> dict[str, Any]:
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)
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/advantage_air/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/anthemav/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def __init__(
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(
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/broadlink/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/brottsplatskartan/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/bsblan/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
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:
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/devolo_home_control/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/elgato/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/homewizard/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/honeywell/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class HoneywellUSThermostat(ClimateEntity):
"""Representation of a Honeywell US Thermostat."""

_attr_has_entity_name = True
_attr_name = None

def __init__(
self,
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/jellyfin/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def __init__(
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
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/jellyfin/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions homeassistant/components/jvc_projector/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit 70d3dc2

Please sign in to comment.