Fix explicit device naming for integrations m-r (#95620)

Fix explicit device naming for m-r
This commit is contained in:
Joost Lekkerkerker 2023-06-30 17:34:35 +02:00 committed by GitHub
parent 7eb26cb9c9
commit 9cf691abdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 11 additions and 0 deletions

View file

@ -45,6 +45,7 @@ ZONE_ENTITY_DESCRIPTIONS = [
device_class=SwitchDeviceClass.SWITCH,
icon="mdi:sprinkler",
key="manual",
name=None,
on_off_fn=lambda valve, bool: valve.set_is_watering(bool),
state_fn=lambda valve: valve.is_watering,
),

View file

@ -34,6 +34,7 @@ class OpenMeteoWeatherEntity(
"""Defines an Open-Meteo weather entity."""
_attr_has_entity_name = True
_attr_name = None
_attr_native_precipitation_unit = UnitOfPrecipitationDepth.MILLIMETERS
_attr_native_temperature_unit = UnitOfTemperature.CELSIUS
_attr_native_wind_speed_unit = UnitOfSpeed.KILOMETERS_PER_HOUR

View file

@ -48,6 +48,7 @@ class OpenhomeUpdateEntity(UpdateEntity):
_attr_device_class = UpdateDeviceClass.FIRMWARE
_attr_supported_features = UpdateEntityFeature.INSTALL
_attr_has_entity_name = True
_attr_name = None
def __init__(self, device):
"""Initialize a Linn DS update entity."""

View file

@ -42,6 +42,7 @@ class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity):
"""Representation of an Plugwise thermostat."""
_attr_has_entity_name = True
_attr_name = None
_attr_temperature_unit = UnitOfTemperature.CELSIUS
_attr_translation_key = DOMAIN

View file

@ -47,6 +47,7 @@ SENSORS: dict[str, tuple[PrusaLinkSensorEntityDescription, ...]] = {
"printer": (
PrusaLinkSensorEntityDescription[PrinterInfo](
key="printer.state",
name=None,
icon="mdi:printer-3d",
value_fn=lambda data: (
"pausing"

View file

@ -67,6 +67,7 @@ class RainBirdSwitch(CoordinatorEntity[RainbirdUpdateCoordinator], SwitchEntity)
self._attr_name = imported_name
self._attr_has_entity_name = False
else:
self._attr_name = None
self._attr_has_entity_name = True
self._state = None
self._duration_minutes = duration_minutes

View file

@ -48,6 +48,7 @@ class ReCollectWasteCalendar(ReCollectWasteEntity, CalendarEntity):
"""Define a ReCollect Waste calendar."""
_attr_icon = "mdi:delete-empty"
_attr_name = None
def __init__(
self,

View file

@ -548,6 +548,8 @@ class RfxtrxCommandEntity(RfxtrxEntity):
Contains the common logic for Rfxtrx lights and switches.
"""
_attr_name = None
def __init__(
self,
device: rfxtrxmod.RFXtrxDevice,

View file

@ -50,6 +50,7 @@ class RidwellCalendar(RidwellEntity, CalendarEntity):
"""Define a Ridwell calendar."""
_attr_icon = "mdi:delete-empty"
_attr_name = None
def __init__(
self, coordinator: RidwellDataUpdateCoordinator, account: RidwellAccount

View file

@ -36,6 +36,7 @@ class RitualsSwitchEntityDescription(
ENTITY_DESCRIPTIONS = (
RitualsSwitchEntityDescription(
key="is_on",
name=None,
icon="mdi:fan",
is_on_fn=lambda diffuser: diffuser.is_on,
turn_on_fn=lambda diffuser: diffuser.turn_on(),