Update integrations f-i to override extra_state_attributes() (#47757)
This commit is contained in:
parent
6c084ae6ce
commit
af4d06b12e
119 changed files with 165 additions and 165 deletions
|
@ -68,7 +68,7 @@ class FAABinarySensor(CoordinatorEntity, BinarySensorEntity):
|
|||
return f"{self._id}_{self._sensor_type}"
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return attributes for sensor."""
|
||||
if self._sensor_type == "GROUND_DELAY":
|
||||
self._attrs["average"] = self.coordinator.data.ground_delay.average
|
||||
|
|
|
@ -263,7 +263,7 @@ class FaceClassifyEntity(ImageProcessingFaceEntity):
|
|||
return self._name
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the classifier attributes."""
|
||||
return {
|
||||
"matched_faces": self._matched,
|
||||
|
|
|
@ -506,7 +506,7 @@ class FibaroDevice(Entity):
|
|||
return False
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes of the device."""
|
||||
attr = {"fibaro_id": self.fibaro_device.id}
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ class FidoSensor(Entity):
|
|||
return self._icon
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes of the sensor."""
|
||||
return {"number": self._number}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ class Filesize(Entity):
|
|||
return ICON
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return other details about the sensor state."""
|
||||
return {
|
||||
"path": self._path,
|
||||
|
|
|
@ -351,7 +351,7 @@ class SensorFilter(Entity):
|
|||
return False
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes of the sensor."""
|
||||
return {ATTR_ENTITY_ID: self._entity}
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ class FinTsAccount(Entity):
|
|||
return self._currency
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> dict:
|
||||
def extra_state_attributes(self) -> dict:
|
||||
"""Additional attributes of the sensor."""
|
||||
attributes = {ATTR_ACCOUNT: self._account.iban, ATTR_ACCOUNT_TYPE: "balance"}
|
||||
if self._client.name:
|
||||
|
@ -238,7 +238,7 @@ class FinTsHoldingsAccount(Entity):
|
|||
return ICON
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> dict:
|
||||
def extra_state_attributes(self) -> dict:
|
||||
"""Additional attributes of the sensor.
|
||||
|
||||
Lists each holding of the account with the current value.
|
||||
|
|
|
@ -62,7 +62,7 @@ class ResponseBinarySensor(CoordinatorEntity, BinarySensorEntity):
|
|||
return self._state
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return available attributes for binary sensor."""
|
||||
attr = {}
|
||||
if not self.coordinator.data:
|
||||
|
|
|
@ -64,7 +64,7 @@ class IncidentsSensor(RestoreEntity):
|
|||
return False
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> object:
|
||||
def extra_state_attributes(self) -> object:
|
||||
"""Return available attributes for sensor."""
|
||||
attr = {}
|
||||
data = self._state_attributes
|
||||
|
|
|
@ -73,7 +73,7 @@ class ResponseSwitch(SwitchEntity):
|
|||
return self._client.on_duty
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> object:
|
||||
def extra_state_attributes(self) -> object:
|
||||
"""Return available attributes for switch."""
|
||||
attr = {}
|
||||
if not self._state_attributes:
|
||||
|
|
|
@ -457,7 +457,7 @@ class FitbitSensor(Entity):
|
|||
return f"mdi:{FITBIT_RESOURCES_LIST[self.resource_type][2]}"
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
attrs = {}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ class ExchangeRateSensor(Entity):
|
|||
return self._state
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
if self.data.rate is not None:
|
||||
return {
|
||||
|
|
|
@ -93,7 +93,7 @@ class Flexit(ClimateEntity):
|
|||
self._current_operation = self.unit.get_operation
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return device specific state attributes."""
|
||||
return {
|
||||
"filter_hours": self._filter_hours,
|
||||
|
|
|
@ -186,7 +186,7 @@ class FlicButton(BinarySensorEntity):
|
|||
return False
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return device specific state attributes."""
|
||||
return {"address": self.address}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ class FlickPricingSensor(Entity):
|
|||
return UNIT_NAME
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return self._attributes
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ class FloPendingAlertsBinarySensor(FloEntity, BinarySensorEntity):
|
|||
return self._device.has_alerts
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
if not self._device.has_alerts:
|
||||
return {}
|
||||
|
|
|
@ -100,7 +100,7 @@ class FluNearYouSensor(CoordinatorEntity):
|
|||
self._unit = unit
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
return self._attrs
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ class Folder(Entity):
|
|||
return self.ICON
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return other details about the sensor state."""
|
||||
return {
|
||||
"path": self._folder_path,
|
||||
|
|
|
@ -105,7 +105,7 @@ class FreeboxDevice(ScannerEntity):
|
|||
return self._icon
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, any]:
|
||||
def extra_state_attributes(self) -> Dict[str, any]:
|
||||
"""Return the attributes."""
|
||||
return self._attrs
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ class FreeboxCallSensor(FreeboxSensor):
|
|||
self._state = len(self._call_list_for_type)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, any]:
|
||||
def extra_state_attributes(self) -> Dict[str, any]:
|
||||
"""Return device specific state attributes."""
|
||||
return {
|
||||
dt_util.utc_from_timestamp(call["datetime"]).isoformat(): call["name"]
|
||||
|
|
|
@ -191,7 +191,7 @@ class FritzboxThermostat(ClimateEntity):
|
|||
return MAX_TEMPERATURE
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device specific state attributes."""
|
||||
attrs = {
|
||||
ATTR_STATE_BATTERY_LOW: self._device.battery_low,
|
||||
|
|
|
@ -80,7 +80,7 @@ class FritzBoxTempSensor(Entity):
|
|||
self._fritz.login()
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes of the device."""
|
||||
attrs = {
|
||||
ATTR_STATE_DEVICE_LOCKED: self._device.device_lock,
|
||||
|
|
|
@ -93,7 +93,7 @@ class FritzboxSwitch(SwitchEntity):
|
|||
self._fritz.login()
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes of the device."""
|
||||
attrs = {}
|
||||
attrs[ATTR_STATE_DEVICE_LOCKED] = self._device.device_lock
|
||||
|
|
|
@ -169,7 +169,7 @@ class FritzBoxCallSensor(Entity):
|
|||
return ICON_PHONE
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
if self._prefixes:
|
||||
self._attributes[ATTR_PREFIXES] = self._prefixes
|
||||
|
|
|
@ -135,7 +135,7 @@ class GaradgetCover(CoverEntity):
|
|||
return self._available
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
data = {}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ class GarminConnectSensor(Entity):
|
|||
return self._unit
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return attributes for sensor."""
|
||||
if not self._data.data:
|
||||
return {}
|
||||
|
|
|
@ -213,7 +213,7 @@ class GdacsEvent(GeolocationEvent):
|
|||
return LENGTH_KILOMETERS
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
attributes = {}
|
||||
for key, value in (
|
||||
|
|
|
@ -129,7 +129,7 @@ class GdacsSensor(Entity):
|
|||
return DEFAULT_UNIT_OF_MEASUREMENT
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
attributes = {}
|
||||
for key, value in (
|
||||
|
|
|
@ -72,7 +72,7 @@ class Geizwatch(Entity):
|
|||
return self._device.prices[0]
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
while len(self._device.prices) < 4:
|
||||
self._device.prices.append("None")
|
||||
|
|
|
@ -250,7 +250,7 @@ class GeniusDevice(GeniusEntity):
|
|||
self._last_comms = self._state_attr = None
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the device state attributes."""
|
||||
attrs = {}
|
||||
attrs["assigned_zone"] = self._device.data["assignedZones"][0]["name"]
|
||||
|
@ -317,7 +317,7 @@ class GeniusZone(GeniusEntity):
|
|||
return self._zone.name
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the device state attributes."""
|
||||
status = {k: v for k, v in self._zone.data.items() if k in GH_ZONE_ATTRS}
|
||||
return {"status": status}
|
||||
|
|
|
@ -106,7 +106,7 @@ class GeniusIssue(GeniusEntity):
|
|||
return len(self._issues)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the device state attributes."""
|
||||
return {f"{self._level}_list": self._issues}
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ class GeoJsonLocationEvent(GeolocationEvent):
|
|||
return LENGTH_KILOMETERS
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
if not self._external_id:
|
||||
return {}
|
||||
|
|
|
@ -137,7 +137,7 @@ class GeoRssServiceSensor(Entity):
|
|||
return DEFAULT_ICON
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return self._state_attributes
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ class GeofencyEntity(TrackerEntity, RestoreEntity):
|
|||
self._unique_id = device
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return device specific attributes."""
|
||||
return self._attributes
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ class GeonetnzQuakesEvent(GeolocationEvent):
|
|||
return LENGTH_KILOMETERS
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
attributes = {}
|
||||
for key, value in (
|
||||
|
|
|
@ -130,7 +130,7 @@ class GeonetnzQuakesSensor(Entity):
|
|||
return DEFAULT_UNIT_OF_MEASUREMENT
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
attributes = {}
|
||||
for key, value in (
|
||||
|
|
|
@ -149,7 +149,7 @@ class GeonetnzVolcanoSensor(Entity):
|
|||
return "alert level"
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
attributes = {}
|
||||
for key, value in (
|
||||
|
|
|
@ -131,7 +131,7 @@ class GiosAirQuality(CoordinatorEntity, AirQualityEntity):
|
|||
}
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
# Different measuring stations have different sets of sensors. We don't know
|
||||
# what data we will get.
|
||||
|
|
|
@ -119,7 +119,7 @@ class GitHubSensor(Entity):
|
|||
return self._available
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
attrs = {
|
||||
ATTR_PATH: self._repository_path,
|
||||
|
|
|
@ -99,7 +99,7 @@ class GitLabSensor(Entity):
|
|||
return self._available
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return {
|
||||
ATTR_ATTRIBUTION: ATTRIBUTION,
|
||||
|
|
|
@ -76,7 +76,7 @@ class GitterSensor(Entity):
|
|||
return self._unit_of_measurement
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return {
|
||||
ATTR_USERNAME: self._username,
|
||||
|
|
|
@ -122,6 +122,6 @@ class DeviceCover(GoGoGate2Entity, CoverEntity):
|
|||
await self._api.async_close_door(self._get_door().door_id)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return {"door_id": self._get_door().door_id}
|
||||
|
|
|
@ -50,7 +50,7 @@ class DoorSensor(GoGoGate2Entity):
|
|||
return door.voltage # This is a percentage, not an absolute voltage
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
door = self._get_door()
|
||||
if door.sensorid is not None:
|
||||
|
|
|
@ -80,7 +80,7 @@ class GoogleCalendarEventDevice(CalendarEventDevice):
|
|||
self.entity_id = entity_id
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
return {"offset_reached": self._offset_reached}
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ class GoogleTravelTimeSensor(Entity):
|
|||
return self._name
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
if self._matrix is None:
|
||||
return None
|
||||
|
|
|
@ -94,7 +94,7 @@ class GpsdSensor(Entity):
|
|||
return None
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes of the GPS."""
|
||||
return {
|
||||
ATTR_LATITUDE: self.agps_thread.data_stream.lat,
|
||||
|
|
|
@ -79,7 +79,7 @@ class GPSLoggerEntity(TrackerEntity, RestoreEntity):
|
|||
return self._battery
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return device specific attributes."""
|
||||
return self._attributes
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ class CurrentSensor(GEMSensor):
|
|||
return self._sensor.watts
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return total wattseconds in the state dictionary."""
|
||||
if not self._sensor:
|
||||
return None
|
||||
|
@ -242,7 +242,7 @@ class PulseCounter(GEMSensor):
|
|||
return f"{self._counted_quantity}/{self._time_unit}"
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return total pulses in the data dictionary."""
|
||||
if not self._sensor:
|
||||
return None
|
||||
|
|
|
@ -208,7 +208,7 @@ class CoverGroup(GroupEntity, CoverEntity):
|
|||
return self._tilt_position
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes for the cover group."""
|
||||
return {ATTR_ENTITY_ID: self._entities}
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ class LightGroup(GroupEntity, light.LightEntity):
|
|||
return False
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes for the light group."""
|
||||
return {ATTR_ENTITY_ID: self._entity_ids}
|
||||
|
||||
|
|
|
@ -569,7 +569,7 @@ class GTFSDepartureSensor(Entity):
|
|||
return self._available
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> dict:
|
||||
def extra_state_attributes(self) -> dict:
|
||||
"""Return the state attributes."""
|
||||
return self._attributes
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ class GuardianEntity(CoordinatorEntity):
|
|||
return self._device_info
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> dict:
|
||||
def extra_state_attributes(self) -> dict:
|
||||
"""Return the state attributes."""
|
||||
return self._attrs
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ class HabitipyTaskSensor(Entity):
|
|||
return self._state
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes of all user tasks."""
|
||||
if self._updater.tasks is not None:
|
||||
all_received_tasks = self._updater.tasks
|
||||
|
|
|
@ -193,7 +193,7 @@ class HarmonyRemote(ConnectionStateMixin, remote.RemoteEntity, RestoreEntity):
|
|||
return self._data.activity_names
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Add platform specific attributes."""
|
||||
return {
|
||||
ATTR_ACTIVITY_STARTING: self._activity_starting,
|
||||
|
|
|
@ -80,7 +80,7 @@ class HaveIBeenPwnedSensor(Entity):
|
|||
return self._state
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the attributes of the sensor."""
|
||||
val = {ATTR_ATTRIBUTION: ATTRIBUTION}
|
||||
if self._email not in self._data.data:
|
||||
|
|
|
@ -88,7 +88,7 @@ class HddTempSensor(Entity):
|
|||
return self._unit
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes of the sensor."""
|
||||
if self._details is not None:
|
||||
return {ATTR_DEVICE: self._details[0], ATTR_MODEL: self._details[1]}
|
||||
|
|
|
@ -450,7 +450,7 @@ class CecEntity(Entity):
|
|||
)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
state_attr = {}
|
||||
if self.vendor_id is not None:
|
||||
|
|
|
@ -262,7 +262,7 @@ class HeosMediaPlayer(MediaPlayerEntity):
|
|||
}
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> dict:
|
||||
def extra_state_attributes(self) -> dict:
|
||||
"""Get additional attribute about the state."""
|
||||
return {
|
||||
"media_album_id": self._player.now_playing_media.album_id,
|
||||
|
|
|
@ -271,7 +271,7 @@ class HERETravelTimeSensor(Entity):
|
|||
return self._name
|
||||
|
||||
@property
|
||||
def device_state_attributes(
|
||||
def extra_state_attributes(
|
||||
self,
|
||||
) -> Optional[Dict[str, Union[None, float, str, bool]]]:
|
||||
"""Return the state attributes."""
|
||||
|
|
|
@ -252,7 +252,7 @@ class HikvisionBinarySensor(BinarySensorEntity):
|
|||
return False
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
attr = {ATTR_LAST_TRIP_TIME: self._sensor_last_update()}
|
||||
|
||||
|
|
|
@ -174,7 +174,7 @@ class HistoryStatsSensor(Entity):
|
|||
return self._unit_of_measurement
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes of the sensor."""
|
||||
if self.value is None:
|
||||
return {}
|
||||
|
|
|
@ -69,7 +69,7 @@ class HiveBinarySensorEntity(HiveEntity, BinarySensorEntity):
|
|||
return True
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Show Device Attributes."""
|
||||
return {
|
||||
ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE),
|
||||
|
|
|
@ -94,7 +94,7 @@ class HiveClimateEntity(HiveEntity, ClimateEntity):
|
|||
return self.device["deviceData"]["online"]
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Show Device Attributes."""
|
||||
return {ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE)}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ class HiveDeviceLight(HiveEntity, LightEntity):
|
|||
return self.device["deviceData"]["online"]
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Show Device Attributes."""
|
||||
return {
|
||||
ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE),
|
||||
|
|
|
@ -68,7 +68,7 @@ class HiveSensorEntity(HiveEntity, Entity):
|
|||
return self.device["status"]["state"]
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return {ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE)}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class HiveDevicePlug(HiveEntity, SwitchEntity):
|
|||
return self.device["deviceData"].get("online")
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Show Device Attributes."""
|
||||
return {
|
||||
ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE),
|
||||
|
|
|
@ -298,7 +298,7 @@ class HomeAssistantScene(Scene):
|
|||
return self.scene_config.id
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the scene state attributes."""
|
||||
attributes = {ATTR_ENTITY_ID: list(self.scene_config.states)}
|
||||
unique_id = self.unique_id
|
||||
|
|
|
@ -69,7 +69,7 @@ class HomeAirQualitySensor(HomeKitEntity, AirQualityEntity):
|
|||
return self.service.value(CharacteristicsTypes.DENSITY_VOC)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
data = {"air_quality_text": self.air_quality_text}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ class HomeKitAlarmControlPanelEntity(HomeKitEntity, AlarmControlPanelEntity):
|
|||
)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the optional state attributes."""
|
||||
battery_level = self.service.value(CharacteristicsTypes.BATTERY_LEVEL)
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ class HomeKitGarageDoorCover(HomeKitEntity, CoverEntity):
|
|||
)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the optional state attributes."""
|
||||
obstruction_detected = self.service.value(
|
||||
CharacteristicsTypes.OBSTRUCTION_DETECTED
|
||||
|
@ -235,7 +235,7 @@ class HomeKitWindowCover(HomeKitEntity, CoverEntity):
|
|||
)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the optional state attributes."""
|
||||
obstruction_detected = self.service.value(
|
||||
CharacteristicsTypes.OBSTRUCTION_DETECTED
|
||||
|
|
|
@ -63,7 +63,7 @@ class HomeKitLock(HomeKitEntity, LockEntity):
|
|||
)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the optional state attributes."""
|
||||
attributes = {}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class HomeKitSwitch(HomeKitEntity, SwitchEntity):
|
|||
await self.async_put_characteristics({CharacteristicsTypes.ON: False})
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the optional state attributes."""
|
||||
outlet_in_use = self.service.value(CharacteristicsTypes.OUTLET_IN_USE)
|
||||
if outlet_in_use is not None:
|
||||
|
@ -77,7 +77,7 @@ class HomeKitValve(HomeKitEntity, SwitchEntity):
|
|||
return self.service.value(CharacteristicsTypes.ACTIVE)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the optional state attributes."""
|
||||
attrs = {}
|
||||
|
||||
|
|
|
@ -210,9 +210,9 @@ class HomematicipBaseActionSensor(HomematicipGenericEntity, BinarySensorEntity):
|
|||
return self._device.accelerationSensorTriggered
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes of the acceleration sensor."""
|
||||
state_attr = super().device_state_attributes
|
||||
state_attr = super().extra_state_attributes
|
||||
|
||||
for attr, attr_key in SAM_DEVICE_ATTRIBUTES.items():
|
||||
attr_value = getattr(self._device, attr, None)
|
||||
|
@ -285,9 +285,9 @@ class HomematicipShutterContact(HomematicipMultiContactInterface, BinarySensorEn
|
|||
return DEVICE_CLASS_DOOR
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes of the Shutter Contact."""
|
||||
state_attr = super().device_state_attributes
|
||||
state_attr = super().extra_state_attributes
|
||||
|
||||
if self.has_additional_state:
|
||||
window_state = getattr(self._device, "windowState", None)
|
||||
|
@ -412,9 +412,9 @@ class HomematicipSunshineSensor(HomematicipGenericEntity, BinarySensorEntity):
|
|||
return self._device.sunshine
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes of the illuminance sensor."""
|
||||
state_attr = super().device_state_attributes
|
||||
state_attr = super().extra_state_attributes
|
||||
|
||||
today_sunshine_duration = getattr(self._device, "todaySunshineDuration", None)
|
||||
if today_sunshine_duration:
|
||||
|
@ -482,9 +482,9 @@ class HomematicipSecurityZoneSensorGroup(HomematicipGenericEntity, BinarySensorE
|
|||
return True
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes of the security zone group."""
|
||||
state_attr = super().device_state_attributes
|
||||
state_attr = super().extra_state_attributes
|
||||
|
||||
for attr, attr_key in GROUP_ATTRIBUTES.items():
|
||||
attr_value = getattr(self._device, attr, None)
|
||||
|
@ -526,9 +526,9 @@ class HomematicipSecuritySensorGroup(
|
|||
super().__init__(hap, device, post="Sensors")
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes of the security group."""
|
||||
state_attr = super().device_state_attributes
|
||||
state_attr = super().extra_state_attributes
|
||||
|
||||
smoke_detector_at = getattr(self._device, "smokeDetectorAlarmType", None)
|
||||
if smoke_detector_at:
|
||||
|
|
|
@ -237,9 +237,9 @@ class HomematicipHeatingGroup(HomematicipGenericEntity, ClimateEntity):
|
|||
await self._device.set_active_profile(profile_idx)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes of the access point."""
|
||||
state_attr = super().device_state_attributes
|
||||
state_attr = super().extra_state_attributes
|
||||
|
||||
if self._device.controlMode == HMIP_ECO_CM:
|
||||
if self._indoor_climate.absenceType in [
|
||||
|
|
|
@ -232,7 +232,7 @@ class HomematicipGenericEntity(Entity):
|
|||
return None
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes of the generic entity."""
|
||||
state_attr = {}
|
||||
|
||||
|
|
|
@ -90,9 +90,9 @@ class HomematicipLightMeasuring(HomematicipLight):
|
|||
"""Representation of the HomematicIP measuring light."""
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes of the light."""
|
||||
state_attr = super().device_state_attributes
|
||||
state_attr = super().extra_state_attributes
|
||||
|
||||
current_power_w = self._device.currentPowerConsumption
|
||||
if current_power_w > 0.05:
|
||||
|
@ -206,9 +206,9 @@ class HomematicipNotificationLight(HomematicipGenericEntity, LightEntity):
|
|||
return self._color_switcher.get(simple_rgb_color, [0.0, 0.0])
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes of the notification light sensor."""
|
||||
state_attr = super().device_state_attributes
|
||||
state_attr = super().extra_state_attributes
|
||||
|
||||
if self.is_on:
|
||||
state_attr[ATTR_COLOR_NAME] = self._func_channel.simpleRGBColorState
|
||||
|
|
|
@ -222,9 +222,9 @@ class HomematicipTemperatureSensor(HomematicipGenericEntity):
|
|||
return TEMP_CELSIUS
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes of the windspeed sensor."""
|
||||
state_attr = super().device_state_attributes
|
||||
state_attr = super().extra_state_attributes
|
||||
|
||||
temperature_offset = getattr(self._device, "temperatureOffset", None)
|
||||
if temperature_offset:
|
||||
|
@ -259,9 +259,9 @@ class HomematicipIlluminanceSensor(HomematicipGenericEntity):
|
|||
return LIGHT_LUX
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes of the wind speed sensor."""
|
||||
state_attr = super().device_state_attributes
|
||||
state_attr = super().extra_state_attributes
|
||||
|
||||
for attr, attr_key in ILLUMINATION_DEVICE_ATTRIBUTES.items():
|
||||
attr_value = getattr(self._device, attr, None)
|
||||
|
@ -312,9 +312,9 @@ class HomematicipWindspeedSensor(HomematicipGenericEntity):
|
|||
return SPEED_KILOMETERS_PER_HOUR
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes of the wind speed sensor."""
|
||||
state_attr = super().device_state_attributes
|
||||
state_attr = super().extra_state_attributes
|
||||
|
||||
wind_direction = getattr(self._device, "windDirection", None)
|
||||
if wind_direction is not None:
|
||||
|
@ -354,9 +354,9 @@ class HomematicipPassageDetectorDeltaCounter(HomematicipGenericEntity):
|
|||
return self._device.leftRightCounterDelta
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes of the delta counter."""
|
||||
state_attr = super().device_state_attributes
|
||||
state_attr = super().extra_state_attributes
|
||||
|
||||
state_attr[ATTR_LEFT_COUNTER] = self._device.leftCounter
|
||||
state_attr[ATTR_RIGHT_COUNTER] = self._device.rightCounter
|
||||
|
|
|
@ -141,9 +141,9 @@ class HomematicipGroupSwitch(HomematicipGenericEntity, SwitchEntity):
|
|||
return True
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes of the switch-group."""
|
||||
state_attr = super().device_state_attributes
|
||||
state_attr = super().extra_state_attributes
|
||||
|
||||
if self._device.unreach:
|
||||
state_attr[ATTR_GROUP_MEMBER_UNREACHABLE] = True
|
||||
|
|
|
@ -82,7 +82,7 @@ class HomeworksLight(HomeworksDevice, LightEntity):
|
|||
)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Supported attributes."""
|
||||
return {"homeworks_address": self._addr}
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ class HoneywellUSThermostat(ClimateEntity):
|
|||
return self._device.name
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the device specific state attributes."""
|
||||
data = {}
|
||||
data[ATTR_FAN_ACTION] = "running" if self._device.fan_running else "idle"
|
||||
|
|
|
@ -144,7 +144,7 @@ class HpIloSensor(Entity):
|
|||
return self._state
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
return self._state_attributes
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ class HuaweiLteMobileConnectionBinarySensor(HuaweiLteBaseBinarySensor):
|
|||
return True
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Optional[Dict[str, Any]]:
|
||||
def extra_state_attributes(self) -> Optional[Dict[str, Any]]:
|
||||
"""Get additional attributes related to connection status."""
|
||||
attributes = {}
|
||||
if self._raw_state in CONNECTION_STATE_ATTRIBUTES:
|
||||
|
|
|
@ -126,11 +126,11 @@ class HuaweiLteScannerEntity(HuaweiLteBaseEntity, ScannerEntity):
|
|||
|
||||
_is_connected: bool = attr.ib(init=False, default=False)
|
||||
_hostname: Optional[str] = attr.ib(init=False, default=None)
|
||||
_device_state_attributes: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
_extra_state_attributes: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def __attrs_post_init__(self) -> None:
|
||||
"""Initialize internal state."""
|
||||
self._device_state_attributes["mac_address"] = self.mac
|
||||
self._extra_state_attributes["mac_address"] = self.mac
|
||||
|
||||
@property
|
||||
def _entity_name(self) -> str:
|
||||
|
@ -151,9 +151,9 @@ class HuaweiLteScannerEntity(HuaweiLteBaseEntity, ScannerEntity):
|
|||
return self._is_connected
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Get additional attributes related to entity state."""
|
||||
return self._device_state_attributes
|
||||
return self._extra_state_attributes
|
||||
|
||||
async def async_update(self) -> None:
|
||||
"""Update state."""
|
||||
|
@ -162,6 +162,6 @@ class HuaweiLteScannerEntity(HuaweiLteBaseEntity, ScannerEntity):
|
|||
self._is_connected = host is not None
|
||||
if host is not None:
|
||||
self._hostname = host.get("HostName")
|
||||
self._device_state_attributes = {
|
||||
self._extra_state_attributes = {
|
||||
_better_snakecase(k): v for k, v in host.items() if k != "HostName"
|
||||
}
|
||||
|
|
|
@ -31,9 +31,9 @@ class HuePresence(GenericZLLSensor, BinarySensorEntity):
|
|||
return self.sensor.presence
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
attributes = super().device_state_attributes
|
||||
attributes = super().extra_state_attributes
|
||||
if "sensitivity" in self.sensor.config:
|
||||
attributes["sensitivity"] = self.sensor.config["sensitivity"]
|
||||
if "sensitivitymax" in self.sensor.config:
|
||||
|
|
|
@ -535,7 +535,7 @@ class HueLight(CoordinatorEntity, LightEntity):
|
|||
await self.coordinator.async_request_refresh()
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
if not self.is_group:
|
||||
return {}
|
||||
|
|
|
@ -58,9 +58,9 @@ class HueLightLevel(GenericHueGaugeSensorEntity):
|
|||
return round(float(10 ** ((self.sensor.lightlevel - 1) / 10000)), 2)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
attributes = super().device_state_attributes
|
||||
attributes = super().extra_state_attributes
|
||||
attributes.update(
|
||||
{
|
||||
"lightlevel": self.sensor.lightlevel,
|
||||
|
|
|
@ -197,6 +197,6 @@ class GenericZLLSensor(GenericHueSensor):
|
|||
"""Representation of a Hue-brand, physical sensor."""
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
return {"battery_level": self.sensor.battery}
|
||||
|
|
|
@ -111,7 +111,7 @@ class PowerViewShade(ShadeEntity, CoverEntity):
|
|||
self._current_cover_position = MIN_POSITION
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return {STATE_ATTRIBUTE_ROOM_NAME: self._room_name}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ class PowerViewScene(HDEntity, Scene):
|
|||
return self._scene.name
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return {STATE_ATTRIBUTE_ROOM_NAME: self._room_name}
|
||||
|
||||
|
|
|
@ -174,7 +174,7 @@ class HvvDepartureBinarySensor(CoordinatorEntity, BinarySensorEntity):
|
|||
return DEVICE_CLASS_PROBLEM
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
if not (
|
||||
self.coordinator.last_update_success
|
||||
|
|
|
@ -199,6 +199,6 @@ class HVVDepartureSensor(Entity):
|
|||
return DEVICE_CLASS_TIMESTAMP
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return self.attr
|
||||
|
|
|
@ -151,7 +151,7 @@ class HydrawiseEntity(Entity):
|
|||
]
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return {ATTR_ATTRIBUTION: ATTRIBUTION, "identifier": self.data.get("relay")}
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ class IcloudTrackerEntity(TrackerEntity):
|
|||
return icon_for_icloud_device(self._device)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, any]:
|
||||
def extra_state_attributes(self) -> Dict[str, any]:
|
||||
"""Return the device state attributes."""
|
||||
return self._device.state_attributes
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ class IcloudDeviceBatterySensor(Entity):
|
|||
)
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, any]:
|
||||
def extra_state_attributes(self) -> Dict[str, any]:
|
||||
"""Return default attributes for the iCloud device entity."""
|
||||
return self._device.state_attributes
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ class IgnSismologiaLocationEvent(GeolocationEvent):
|
|||
return LENGTH_KILOMETERS
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the device state attributes."""
|
||||
attributes = {}
|
||||
for key, value in (
|
||||
|
|
|
@ -42,7 +42,7 @@ class IHCDevice(Entity):
|
|||
return self._name
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
if not self.info:
|
||||
return {}
|
||||
|
|
|
@ -171,7 +171,7 @@ class EmailContentSensor(Entity):
|
|||
return self._message
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return other state attributes for the message."""
|
||||
return self._state_attributes
|
||||
|
||||
|
|
|
@ -40,6 +40,6 @@ class IncomfortFailed(IncomfortChild, BinarySensorEntity):
|
|||
return self._heater.status["is_failed"]
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Optional[Dict[str, Any]]:
|
||||
def extra_state_attributes(self) -> Optional[Dict[str, Any]]:
|
||||
"""Return the device state attributes."""
|
||||
return {"fault_code": self._heater.status["fault_code"]}
|
||||
|
|
|
@ -39,7 +39,7 @@ class InComfortClimate(IncomfortChild, ClimateEntity):
|
|||
self._room = room
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the device state attributes."""
|
||||
return {"status": self._room.status}
|
||||
|
||||
|
|
|
@ -95,6 +95,6 @@ class IncomfortTemperature(IncomfortSensor):
|
|||
self._unit_of_measurement = TEMP_CELSIUS
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Optional[Dict[str, Any]]:
|
||||
def extra_state_attributes(self) -> Optional[Dict[str, Any]]:
|
||||
"""Return the device state attributes."""
|
||||
return {self._attr: self._heater.status[self._attr]}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue