1 """Support for IQVIA."""
3 from __future__
import annotations
12 DataUpdateCoordinator,
15 from .const
import CONF_ZIP_CODE, DOMAIN, TYPE_ALLERGY_FORECAST, TYPE_ALLERGY_OUTLOOK
19 """Define a base IQVIA entity."""
21 _attr_has_entity_name =
True
25 coordinator: DataUpdateCoordinator[dict[str, Any]],
27 description: EntityDescription,
33 self.
_attr_unique_id_attr_unique_id = f
"{entry.data[CONF_ZIP_CODE]}_{description.key}"
39 """Handle updated data from the coordinator."""
40 if not self.coordinator.last_update_success:
44 self.async_write_ha_state()
47 """Register callbacks."""
52 self.
hasshass.data[DOMAIN][self.
_entry_entry.entry_id][
61 """Update the entity from the latest data."""
62 raise NotImplementedError
None _handle_coordinator_update(self)
None __init__(self, DataUpdateCoordinator[dict[str, Any]] coordinator, ConfigEntry entry, EntityDescription description)
None async_added_to_hass(self)
_attr_extra_state_attributes
None update_from_latest_data(self)
Callable[[], None] async_add_listener(self, CALLBACK_TYPE update_callback, Any context=None)