Fix explicit device naming for integrations m-r (#95620)
Fix explicit device naming for m-r
This commit is contained in:
parent
7eb26cb9c9
commit
9cf691abdb
10 changed files with 11 additions and 0 deletions
|
@ -45,6 +45,7 @@ ZONE_ENTITY_DESCRIPTIONS = [
|
||||||
device_class=SwitchDeviceClass.SWITCH,
|
device_class=SwitchDeviceClass.SWITCH,
|
||||||
icon="mdi:sprinkler",
|
icon="mdi:sprinkler",
|
||||||
key="manual",
|
key="manual",
|
||||||
|
name=None,
|
||||||
on_off_fn=lambda valve, bool: valve.set_is_watering(bool),
|
on_off_fn=lambda valve, bool: valve.set_is_watering(bool),
|
||||||
state_fn=lambda valve: valve.is_watering,
|
state_fn=lambda valve: valve.is_watering,
|
||||||
),
|
),
|
||||||
|
|
|
@ -34,6 +34,7 @@ class OpenMeteoWeatherEntity(
|
||||||
"""Defines an Open-Meteo weather entity."""
|
"""Defines an Open-Meteo weather entity."""
|
||||||
|
|
||||||
_attr_has_entity_name = True
|
_attr_has_entity_name = True
|
||||||
|
_attr_name = None
|
||||||
_attr_native_precipitation_unit = UnitOfPrecipitationDepth.MILLIMETERS
|
_attr_native_precipitation_unit = UnitOfPrecipitationDepth.MILLIMETERS
|
||||||
_attr_native_temperature_unit = UnitOfTemperature.CELSIUS
|
_attr_native_temperature_unit = UnitOfTemperature.CELSIUS
|
||||||
_attr_native_wind_speed_unit = UnitOfSpeed.KILOMETERS_PER_HOUR
|
_attr_native_wind_speed_unit = UnitOfSpeed.KILOMETERS_PER_HOUR
|
||||||
|
|
|
@ -48,6 +48,7 @@ class OpenhomeUpdateEntity(UpdateEntity):
|
||||||
_attr_device_class = UpdateDeviceClass.FIRMWARE
|
_attr_device_class = UpdateDeviceClass.FIRMWARE
|
||||||
_attr_supported_features = UpdateEntityFeature.INSTALL
|
_attr_supported_features = UpdateEntityFeature.INSTALL
|
||||||
_attr_has_entity_name = True
|
_attr_has_entity_name = True
|
||||||
|
_attr_name = None
|
||||||
|
|
||||||
def __init__(self, device):
|
def __init__(self, device):
|
||||||
"""Initialize a Linn DS update entity."""
|
"""Initialize a Linn DS update entity."""
|
||||||
|
|
|
@ -42,6 +42,7 @@ class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity):
|
||||||
"""Representation of an Plugwise thermostat."""
|
"""Representation of an Plugwise thermostat."""
|
||||||
|
|
||||||
_attr_has_entity_name = True
|
_attr_has_entity_name = True
|
||||||
|
_attr_name = None
|
||||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||||
_attr_translation_key = DOMAIN
|
_attr_translation_key = DOMAIN
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ SENSORS: dict[str, tuple[PrusaLinkSensorEntityDescription, ...]] = {
|
||||||
"printer": (
|
"printer": (
|
||||||
PrusaLinkSensorEntityDescription[PrinterInfo](
|
PrusaLinkSensorEntityDescription[PrinterInfo](
|
||||||
key="printer.state",
|
key="printer.state",
|
||||||
|
name=None,
|
||||||
icon="mdi:printer-3d",
|
icon="mdi:printer-3d",
|
||||||
value_fn=lambda data: (
|
value_fn=lambda data: (
|
||||||
"pausing"
|
"pausing"
|
||||||
|
|
|
@ -67,6 +67,7 @@ class RainBirdSwitch(CoordinatorEntity[RainbirdUpdateCoordinator], SwitchEntity)
|
||||||
self._attr_name = imported_name
|
self._attr_name = imported_name
|
||||||
self._attr_has_entity_name = False
|
self._attr_has_entity_name = False
|
||||||
else:
|
else:
|
||||||
|
self._attr_name = None
|
||||||
self._attr_has_entity_name = True
|
self._attr_has_entity_name = True
|
||||||
self._state = None
|
self._state = None
|
||||||
self._duration_minutes = duration_minutes
|
self._duration_minutes = duration_minutes
|
||||||
|
|
|
@ -48,6 +48,7 @@ class ReCollectWasteCalendar(ReCollectWasteEntity, CalendarEntity):
|
||||||
"""Define a ReCollect Waste calendar."""
|
"""Define a ReCollect Waste calendar."""
|
||||||
|
|
||||||
_attr_icon = "mdi:delete-empty"
|
_attr_icon = "mdi:delete-empty"
|
||||||
|
_attr_name = None
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -548,6 +548,8 @@ class RfxtrxCommandEntity(RfxtrxEntity):
|
||||||
Contains the common logic for Rfxtrx lights and switches.
|
Contains the common logic for Rfxtrx lights and switches.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
_attr_name = None
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
device: rfxtrxmod.RFXtrxDevice,
|
device: rfxtrxmod.RFXtrxDevice,
|
||||||
|
|
|
@ -50,6 +50,7 @@ class RidwellCalendar(RidwellEntity, CalendarEntity):
|
||||||
"""Define a Ridwell calendar."""
|
"""Define a Ridwell calendar."""
|
||||||
|
|
||||||
_attr_icon = "mdi:delete-empty"
|
_attr_icon = "mdi:delete-empty"
|
||||||
|
_attr_name = None
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, coordinator: RidwellDataUpdateCoordinator, account: RidwellAccount
|
self, coordinator: RidwellDataUpdateCoordinator, account: RidwellAccount
|
||||||
|
|
|
@ -36,6 +36,7 @@ class RitualsSwitchEntityDescription(
|
||||||
ENTITY_DESCRIPTIONS = (
|
ENTITY_DESCRIPTIONS = (
|
||||||
RitualsSwitchEntityDescription(
|
RitualsSwitchEntityDescription(
|
||||||
key="is_on",
|
key="is_on",
|
||||||
|
name=None,
|
||||||
icon="mdi:fan",
|
icon="mdi:fan",
|
||||||
is_on_fn=lambda diffuser: diffuser.is_on,
|
is_on_fn=lambda diffuser: diffuser.is_on,
|
||||||
turn_on_fn=lambda diffuser: diffuser.turn_on(),
|
turn_on_fn=lambda diffuser: diffuser.turn_on(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue