mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Migrate IQVIA to new entity naming style (#74917)
This commit is contained in:
parent
d6ceebbb68
commit
8285f42d26
@ -118,6 +118,8 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
class IQVIAEntity(CoordinatorEntity):
|
class IQVIAEntity(CoordinatorEntity):
|
||||||
"""Define a base IQVIA entity."""
|
"""Define a base IQVIA entity."""
|
||||||
|
|
||||||
|
_attr_has_entity_name = True
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
coordinator: DataUpdateCoordinator,
|
coordinator: DataUpdateCoordinator,
|
||||||
|
@ -79,17 +79,17 @@ TREND_SUBSIDING = "Subsiding"
|
|||||||
FORECAST_SENSOR_DESCRIPTIONS = (
|
FORECAST_SENSOR_DESCRIPTIONS = (
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key=TYPE_ALLERGY_FORECAST,
|
key=TYPE_ALLERGY_FORECAST,
|
||||||
name="Allergy Index: Forecasted Average",
|
name="Allergy index: forecasted average",
|
||||||
icon="mdi:flower",
|
icon="mdi:flower",
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key=TYPE_ASTHMA_FORECAST,
|
key=TYPE_ASTHMA_FORECAST,
|
||||||
name="Asthma Index: Forecasted Average",
|
name="Asthma index: forecasted average",
|
||||||
icon="mdi:flower",
|
icon="mdi:flower",
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key=TYPE_DISEASE_FORECAST,
|
key=TYPE_DISEASE_FORECAST,
|
||||||
name="Cold & Flu: Forecasted Average",
|
name="Cold & flu: forecasted average",
|
||||||
icon="mdi:snowflake",
|
icon="mdi:snowflake",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -97,29 +97,29 @@ FORECAST_SENSOR_DESCRIPTIONS = (
|
|||||||
INDEX_SENSOR_DESCRIPTIONS = (
|
INDEX_SENSOR_DESCRIPTIONS = (
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key=TYPE_ALLERGY_TODAY,
|
key=TYPE_ALLERGY_TODAY,
|
||||||
name="Allergy Index: Today",
|
name="Allergy index: today",
|
||||||
icon="mdi:flower",
|
icon="mdi:flower",
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key=TYPE_ALLERGY_TOMORROW,
|
key=TYPE_ALLERGY_TOMORROW,
|
||||||
name="Allergy Index: Tomorrow",
|
name="Allergy index: tomorrow",
|
||||||
icon="mdi:flower",
|
icon="mdi:flower",
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key=TYPE_ASTHMA_TODAY,
|
key=TYPE_ASTHMA_TODAY,
|
||||||
name="Asthma Index: Today",
|
name="Asthma index: today",
|
||||||
icon="mdi:flower",
|
icon="mdi:flower",
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key=TYPE_ASTHMA_TOMORROW,
|
key=TYPE_ASTHMA_TOMORROW,
|
||||||
name="Asthma Index: Tomorrow",
|
name="Asthma index: tomorrow",
|
||||||
icon="mdi:flower",
|
icon="mdi:flower",
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key=TYPE_DISEASE_TODAY,
|
key=TYPE_DISEASE_TODAY,
|
||||||
name="Cold & Flu Index: Today",
|
name="Cold & flu index: today",
|
||||||
icon="mdi:pill",
|
icon="mdi:pill",
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user