Update integrations f-i to override extra_state_attributes() (#47757)

This commit is contained in:
Erik Montnemery 2021-03-11 16:57:47 +01:00 committed by GitHub
parent 6c084ae6ce
commit af4d06b12e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
119 changed files with 165 additions and 165 deletions

View file

@ -68,7 +68,7 @@ class FAABinarySensor(CoordinatorEntity, BinarySensorEntity):
return f"{self._id}_{self._sensor_type}" return f"{self._id}_{self._sensor_type}"
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return attributes for sensor.""" """Return attributes for sensor."""
if self._sensor_type == "GROUND_DELAY": if self._sensor_type == "GROUND_DELAY":
self._attrs["average"] = self.coordinator.data.ground_delay.average self._attrs["average"] = self.coordinator.data.ground_delay.average

View file

@ -263,7 +263,7 @@ class FaceClassifyEntity(ImageProcessingFaceEntity):
return self._name return self._name
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the classifier attributes.""" """Return the classifier attributes."""
return { return {
"matched_faces": self._matched, "matched_faces": self._matched,

View file

@ -506,7 +506,7 @@ class FibaroDevice(Entity):
return False return False
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes of the device.""" """Return the state attributes of the device."""
attr = {"fibaro_id": self.fibaro_device.id} attr = {"fibaro_id": self.fibaro_device.id}

View file

@ -125,7 +125,7 @@ class FidoSensor(Entity):
return self._icon return self._icon
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes of the sensor.""" """Return the state attributes of the sensor."""
return {"number": self._number} return {"number": self._number}

View file

@ -76,7 +76,7 @@ class Filesize(Entity):
return ICON return ICON
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return other details about the sensor state.""" """Return other details about the sensor state."""
return { return {
"path": self._path, "path": self._path,

View file

@ -351,7 +351,7 @@ class SensorFilter(Entity):
return False return False
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes of the sensor.""" """Return the state attributes of the sensor."""
return {ATTR_ENTITY_ID: self._entity} return {ATTR_ENTITY_ID: self._entity}

View file

@ -193,7 +193,7 @@ class FinTsAccount(Entity):
return self._currency return self._currency
@property @property
def device_state_attributes(self) -> dict: def extra_state_attributes(self) -> dict:
"""Additional attributes of the sensor.""" """Additional attributes of the sensor."""
attributes = {ATTR_ACCOUNT: self._account.iban, ATTR_ACCOUNT_TYPE: "balance"} attributes = {ATTR_ACCOUNT: self._account.iban, ATTR_ACCOUNT_TYPE: "balance"}
if self._client.name: if self._client.name:
@ -238,7 +238,7 @@ class FinTsHoldingsAccount(Entity):
return ICON return ICON
@property @property
def device_state_attributes(self) -> dict: def extra_state_attributes(self) -> dict:
"""Additional attributes of the sensor. """Additional attributes of the sensor.
Lists each holding of the account with the current value. Lists each holding of the account with the current value.

View file

@ -62,7 +62,7 @@ class ResponseBinarySensor(CoordinatorEntity, BinarySensorEntity):
return self._state return self._state
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return available attributes for binary sensor.""" """Return available attributes for binary sensor."""
attr = {} attr = {}
if not self.coordinator.data: if not self.coordinator.data:

View file

@ -64,7 +64,7 @@ class IncidentsSensor(RestoreEntity):
return False return False
@property @property
def device_state_attributes(self) -> object: def extra_state_attributes(self) -> object:
"""Return available attributes for sensor.""" """Return available attributes for sensor."""
attr = {} attr = {}
data = self._state_attributes data = self._state_attributes

View file

@ -73,7 +73,7 @@ class ResponseSwitch(SwitchEntity):
return self._client.on_duty return self._client.on_duty
@property @property
def device_state_attributes(self) -> object: def extra_state_attributes(self) -> object:
"""Return available attributes for switch.""" """Return available attributes for switch."""
attr = {} attr = {}
if not self._state_attributes: if not self._state_attributes:

View file

@ -457,7 +457,7 @@ class FitbitSensor(Entity):
return f"mdi:{FITBIT_RESOURCES_LIST[self.resource_type][2]}" return f"mdi:{FITBIT_RESOURCES_LIST[self.resource_type][2]}"
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
attrs = {} attrs = {}

View file

@ -75,7 +75,7 @@ class ExchangeRateSensor(Entity):
return self._state return self._state
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
if self.data.rate is not None: if self.data.rate is not None:
return { return {

View file

@ -93,7 +93,7 @@ class Flexit(ClimateEntity):
self._current_operation = self.unit.get_operation self._current_operation = self.unit.get_operation
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return device specific state attributes.""" """Return device specific state attributes."""
return { return {
"filter_hours": self._filter_hours, "filter_hours": self._filter_hours,

View file

@ -186,7 +186,7 @@ class FlicButton(BinarySensorEntity):
return False return False
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return device specific state attributes.""" """Return device specific state attributes."""
return {"address": self.address} return {"address": self.address}

View file

@ -61,7 +61,7 @@ class FlickPricingSensor(Entity):
return UNIT_NAME return UNIT_NAME
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
return self._attributes return self._attributes

View file

@ -48,7 +48,7 @@ class FloPendingAlertsBinarySensor(FloEntity, BinarySensorEntity):
return self._device.has_alerts return self._device.has_alerts
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
if not self._device.has_alerts: if not self._device.has_alerts:
return {} return {}

View file

@ -100,7 +100,7 @@ class FluNearYouSensor(CoordinatorEntity):
self._unit = unit self._unit = unit
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
return self._attrs return self._attrs

View file

@ -92,7 +92,7 @@ class Folder(Entity):
return self.ICON return self.ICON
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return other details about the sensor state.""" """Return other details about the sensor state."""
return { return {
"path": self._folder_path, "path": self._folder_path,

View file

@ -105,7 +105,7 @@ class FreeboxDevice(ScannerEntity):
return self._icon return self._icon
@property @property
def device_state_attributes(self) -> Dict[str, any]: def extra_state_attributes(self) -> Dict[str, any]:
"""Return the attributes.""" """Return the attributes."""
return self._attrs return self._attrs

View file

@ -180,7 +180,7 @@ class FreeboxCallSensor(FreeboxSensor):
self._state = len(self._call_list_for_type) self._state = len(self._call_list_for_type)
@property @property
def device_state_attributes(self) -> Dict[str, any]: def extra_state_attributes(self) -> Dict[str, any]:
"""Return device specific state attributes.""" """Return device specific state attributes."""
return { return {
dt_util.utc_from_timestamp(call["datetime"]).isoformat(): call["name"] dt_util.utc_from_timestamp(call["datetime"]).isoformat(): call["name"]

View file

@ -191,7 +191,7 @@ class FritzboxThermostat(ClimateEntity):
return MAX_TEMPERATURE return MAX_TEMPERATURE
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device specific state attributes.""" """Return the device specific state attributes."""
attrs = { attrs = {
ATTR_STATE_BATTERY_LOW: self._device.battery_low, ATTR_STATE_BATTERY_LOW: self._device.battery_low,

View file

@ -80,7 +80,7 @@ class FritzBoxTempSensor(Entity):
self._fritz.login() self._fritz.login()
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes of the device.""" """Return the state attributes of the device."""
attrs = { attrs = {
ATTR_STATE_DEVICE_LOCKED: self._device.device_lock, ATTR_STATE_DEVICE_LOCKED: self._device.device_lock,

View file

@ -93,7 +93,7 @@ class FritzboxSwitch(SwitchEntity):
self._fritz.login() self._fritz.login()
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes of the device.""" """Return the state attributes of the device."""
attrs = {} attrs = {}
attrs[ATTR_STATE_DEVICE_LOCKED] = self._device.device_lock attrs[ATTR_STATE_DEVICE_LOCKED] = self._device.device_lock

View file

@ -169,7 +169,7 @@ class FritzBoxCallSensor(Entity):
return ICON_PHONE return ICON_PHONE
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
if self._prefixes: if self._prefixes:
self._attributes[ATTR_PREFIXES] = self._prefixes self._attributes[ATTR_PREFIXES] = self._prefixes

View file

@ -135,7 +135,7 @@ class GaradgetCover(CoverEntity):
return self._available return self._available
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
data = {} data = {}

View file

@ -120,7 +120,7 @@ class GarminConnectSensor(Entity):
return self._unit return self._unit
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return attributes for sensor.""" """Return attributes for sensor."""
if not self._data.data: if not self._data.data:
return {} return {}

View file

@ -213,7 +213,7 @@ class GdacsEvent(GeolocationEvent):
return LENGTH_KILOMETERS return LENGTH_KILOMETERS
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
attributes = {} attributes = {}
for key, value in ( for key, value in (

View file

@ -129,7 +129,7 @@ class GdacsSensor(Entity):
return DEFAULT_UNIT_OF_MEASUREMENT return DEFAULT_UNIT_OF_MEASUREMENT
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
attributes = {} attributes = {}
for key, value in ( for key, value in (

View file

@ -72,7 +72,7 @@ class Geizwatch(Entity):
return self._device.prices[0] return self._device.prices[0]
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
while len(self._device.prices) < 4: while len(self._device.prices) < 4:
self._device.prices.append("None") self._device.prices.append("None")

View file

@ -250,7 +250,7 @@ class GeniusDevice(GeniusEntity):
self._last_comms = self._state_attr = None self._last_comms = self._state_attr = None
@property @property
def device_state_attributes(self) -> Dict[str, Any]: def extra_state_attributes(self) -> Dict[str, Any]:
"""Return the device state attributes.""" """Return the device state attributes."""
attrs = {} attrs = {}
attrs["assigned_zone"] = self._device.data["assignedZones"][0]["name"] attrs["assigned_zone"] = self._device.data["assignedZones"][0]["name"]
@ -317,7 +317,7 @@ class GeniusZone(GeniusEntity):
return self._zone.name return self._zone.name
@property @property
def device_state_attributes(self) -> Dict[str, Any]: def extra_state_attributes(self) -> Dict[str, Any]:
"""Return the device state attributes.""" """Return the device state attributes."""
status = {k: v for k, v in self._zone.data.items() if k in GH_ZONE_ATTRS} status = {k: v for k, v in self._zone.data.items() if k in GH_ZONE_ATTRS}
return {"status": status} return {"status": status}

View file

@ -106,7 +106,7 @@ class GeniusIssue(GeniusEntity):
return len(self._issues) return len(self._issues)
@property @property
def device_state_attributes(self) -> Dict[str, Any]: def extra_state_attributes(self) -> Dict[str, Any]:
"""Return the device state attributes.""" """Return the device state attributes."""
return {f"{self._level}_list": self._issues} return {f"{self._level}_list": self._issues}

View file

@ -201,7 +201,7 @@ class GeoJsonLocationEvent(GeolocationEvent):
return LENGTH_KILOMETERS return LENGTH_KILOMETERS
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
if not self._external_id: if not self._external_id:
return {} return {}

View file

@ -137,7 +137,7 @@ class GeoRssServiceSensor(Entity):
return DEFAULT_ICON return DEFAULT_ICON
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
return self._state_attributes return self._state_attributes

View file

@ -56,7 +56,7 @@ class GeofencyEntity(TrackerEntity, RestoreEntity):
self._unique_id = device self._unique_id = device
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return device specific attributes.""" """Return device specific attributes."""
return self._attributes return self._attributes

View file

@ -184,7 +184,7 @@ class GeonetnzQuakesEvent(GeolocationEvent):
return LENGTH_KILOMETERS return LENGTH_KILOMETERS
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
attributes = {} attributes = {}
for key, value in ( for key, value in (

View file

@ -130,7 +130,7 @@ class GeonetnzQuakesSensor(Entity):
return DEFAULT_UNIT_OF_MEASUREMENT return DEFAULT_UNIT_OF_MEASUREMENT
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
attributes = {} attributes = {}
for key, value in ( for key, value in (

View file

@ -149,7 +149,7 @@ class GeonetnzVolcanoSensor(Entity):
return "alert level" return "alert level"
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
attributes = {} attributes = {}
for key, value in ( for key, value in (

View file

@ -131,7 +131,7 @@ class GiosAirQuality(CoordinatorEntity, AirQualityEntity):
} }
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
# Different measuring stations have different sets of sensors. We don't know # Different measuring stations have different sets of sensors. We don't know
# what data we will get. # what data we will get.

View file

@ -119,7 +119,7 @@ class GitHubSensor(Entity):
return self._available return self._available
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
attrs = { attrs = {
ATTR_PATH: self._repository_path, ATTR_PATH: self._repository_path,

View file

@ -99,7 +99,7 @@ class GitLabSensor(Entity):
return self._available return self._available
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
return { return {
ATTR_ATTRIBUTION: ATTRIBUTION, ATTR_ATTRIBUTION: ATTRIBUTION,

View file

@ -76,7 +76,7 @@ class GitterSensor(Entity):
return self._unit_of_measurement return self._unit_of_measurement
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
return { return {
ATTR_USERNAME: self._username, ATTR_USERNAME: self._username,

View file

@ -122,6 +122,6 @@ class DeviceCover(GoGoGate2Entity, CoverEntity):
await self._api.async_close_door(self._get_door().door_id) await self._api.async_close_door(self._get_door().door_id)
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
return {"door_id": self._get_door().door_id} return {"door_id": self._get_door().door_id}

View file

@ -50,7 +50,7 @@ class DoorSensor(GoGoGate2Entity):
return door.voltage # This is a percentage, not an absolute voltage return door.voltage # This is a percentage, not an absolute voltage
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
door = self._get_door() door = self._get_door()
if door.sensorid is not None: if door.sensorid is not None:

View file

@ -80,7 +80,7 @@ class GoogleCalendarEventDevice(CalendarEventDevice):
self.entity_id = entity_id self.entity_id = entity_id
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
return {"offset_reached": self._offset_reached} return {"offset_reached": self._offset_reached}

View file

@ -230,7 +230,7 @@ class GoogleTravelTimeSensor(Entity):
return self._name return self._name
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
if self._matrix is None: if self._matrix is None:
return None return None

View file

@ -94,7 +94,7 @@ class GpsdSensor(Entity):
return None return None
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes of the GPS.""" """Return the state attributes of the GPS."""
return { return {
ATTR_LATITUDE: self.agps_thread.data_stream.lat, ATTR_LATITUDE: self.agps_thread.data_stream.lat,

View file

@ -79,7 +79,7 @@ class GPSLoggerEntity(TrackerEntity, RestoreEntity):
return self._battery return self._battery
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return device specific attributes.""" """Return device specific attributes."""
return self._attributes return self._attributes

View file

@ -175,7 +175,7 @@ class CurrentSensor(GEMSensor):
return self._sensor.watts return self._sensor.watts
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return total wattseconds in the state dictionary.""" """Return total wattseconds in the state dictionary."""
if not self._sensor: if not self._sensor:
return None return None
@ -242,7 +242,7 @@ class PulseCounter(GEMSensor):
return f"{self._counted_quantity}/{self._time_unit}" return f"{self._counted_quantity}/{self._time_unit}"
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return total pulses in the data dictionary.""" """Return total pulses in the data dictionary."""
if not self._sensor: if not self._sensor:
return None return None

View file

@ -208,7 +208,7 @@ class CoverGroup(GroupEntity, CoverEntity):
return self._tilt_position return self._tilt_position
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes for the cover group.""" """Return the state attributes for the cover group."""
return {ATTR_ENTITY_ID: self._entities} return {ATTR_ENTITY_ID: self._entities}

View file

@ -187,7 +187,7 @@ class LightGroup(GroupEntity, light.LightEntity):
return False return False
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes for the light group.""" """Return the state attributes for the light group."""
return {ATTR_ENTITY_ID: self._entity_ids} return {ATTR_ENTITY_ID: self._entity_ids}

View file

@ -569,7 +569,7 @@ class GTFSDepartureSensor(Entity):
return self._available return self._available
@property @property
def device_state_attributes(self) -> dict: def extra_state_attributes(self) -> dict:
"""Return the state attributes.""" """Return the state attributes."""
return self._attributes return self._attributes

View file

@ -246,7 +246,7 @@ class GuardianEntity(CoordinatorEntity):
return self._device_info return self._device_info
@property @property
def device_state_attributes(self) -> dict: def extra_state_attributes(self) -> dict:
"""Return the state attributes.""" """Return the state attributes."""
return self._attrs return self._attrs

View file

@ -200,7 +200,7 @@ class HabitipyTaskSensor(Entity):
return self._state return self._state
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes of all user tasks.""" """Return the state attributes of all user tasks."""
if self._updater.tasks is not None: if self._updater.tasks is not None:
all_received_tasks = self._updater.tasks all_received_tasks = self._updater.tasks

View file

@ -193,7 +193,7 @@ class HarmonyRemote(ConnectionStateMixin, remote.RemoteEntity, RestoreEntity):
return self._data.activity_names return self._data.activity_names
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Add platform specific attributes.""" """Add platform specific attributes."""
return { return {
ATTR_ACTIVITY_STARTING: self._activity_starting, ATTR_ACTIVITY_STARTING: self._activity_starting,

View file

@ -80,7 +80,7 @@ class HaveIBeenPwnedSensor(Entity):
return self._state return self._state
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the attributes of the sensor.""" """Return the attributes of the sensor."""
val = {ATTR_ATTRIBUTION: ATTRIBUTION} val = {ATTR_ATTRIBUTION: ATTRIBUTION}
if self._email not in self._data.data: if self._email not in self._data.data:

View file

@ -88,7 +88,7 @@ class HddTempSensor(Entity):
return self._unit return self._unit
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes of the sensor.""" """Return the state attributes of the sensor."""
if self._details is not None: if self._details is not None:
return {ATTR_DEVICE: self._details[0], ATTR_MODEL: self._details[1]} return {ATTR_DEVICE: self._details[0], ATTR_MODEL: self._details[1]}

View file

@ -450,7 +450,7 @@ class CecEntity(Entity):
) )
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
state_attr = {} state_attr = {}
if self.vendor_id is not None: if self.vendor_id is not None:

View file

@ -262,7 +262,7 @@ class HeosMediaPlayer(MediaPlayerEntity):
} }
@property @property
def device_state_attributes(self) -> dict: def extra_state_attributes(self) -> dict:
"""Get additional attribute about the state.""" """Get additional attribute about the state."""
return { return {
"media_album_id": self._player.now_playing_media.album_id, "media_album_id": self._player.now_playing_media.album_id,

View file

@ -271,7 +271,7 @@ class HERETravelTimeSensor(Entity):
return self._name return self._name
@property @property
def device_state_attributes( def extra_state_attributes(
self, self,
) -> Optional[Dict[str, Union[None, float, str, bool]]]: ) -> Optional[Dict[str, Union[None, float, str, bool]]]:
"""Return the state attributes.""" """Return the state attributes."""

View file

@ -252,7 +252,7 @@ class HikvisionBinarySensor(BinarySensorEntity):
return False return False
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
attr = {ATTR_LAST_TRIP_TIME: self._sensor_last_update()} attr = {ATTR_LAST_TRIP_TIME: self._sensor_last_update()}

View file

@ -174,7 +174,7 @@ class HistoryStatsSensor(Entity):
return self._unit_of_measurement return self._unit_of_measurement
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes of the sensor.""" """Return the state attributes of the sensor."""
if self.value is None: if self.value is None:
return {} return {}

View file

@ -69,7 +69,7 @@ class HiveBinarySensorEntity(HiveEntity, BinarySensorEntity):
return True return True
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Show Device Attributes.""" """Show Device Attributes."""
return { return {
ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE), ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE),

View file

@ -94,7 +94,7 @@ class HiveClimateEntity(HiveEntity, ClimateEntity):
return self.device["deviceData"]["online"] return self.device["deviceData"]["online"]
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Show Device Attributes.""" """Show Device Attributes."""
return {ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE)} return {ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE)}

View file

@ -56,7 +56,7 @@ class HiveDeviceLight(HiveEntity, LightEntity):
return self.device["deviceData"]["online"] return self.device["deviceData"]["online"]
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Show Device Attributes.""" """Show Device Attributes."""
return { return {
ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE), ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE),

View file

@ -68,7 +68,7 @@ class HiveSensorEntity(HiveEntity, Entity):
return self.device["status"]["state"] return self.device["status"]["state"]
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
return {ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE)} return {ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE)}

View file

@ -47,7 +47,7 @@ class HiveDevicePlug(HiveEntity, SwitchEntity):
return self.device["deviceData"].get("online") return self.device["deviceData"].get("online")
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Show Device Attributes.""" """Show Device Attributes."""
return { return {
ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE), ATTR_AVAILABLE: self.attributes.get(ATTR_AVAILABLE),

View file

@ -298,7 +298,7 @@ class HomeAssistantScene(Scene):
return self.scene_config.id return self.scene_config.id
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the scene state attributes.""" """Return the scene state attributes."""
attributes = {ATTR_ENTITY_ID: list(self.scene_config.states)} attributes = {ATTR_ENTITY_ID: list(self.scene_config.states)}
unique_id = self.unique_id unique_id = self.unique_id

View file

@ -69,7 +69,7 @@ class HomeAirQualitySensor(HomeKitEntity, AirQualityEntity):
return self.service.value(CharacteristicsTypes.DENSITY_VOC) return self.service.value(CharacteristicsTypes.DENSITY_VOC)
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
data = {"air_quality_text": self.air_quality_text} data = {"air_quality_text": self.air_quality_text}

View file

@ -105,7 +105,7 @@ class HomeKitAlarmControlPanelEntity(HomeKitEntity, AlarmControlPanelEntity):
) )
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the optional state attributes.""" """Return the optional state attributes."""
battery_level = self.service.value(CharacteristicsTypes.BATTERY_LEVEL) battery_level = self.service.value(CharacteristicsTypes.BATTERY_LEVEL)

View file

@ -108,7 +108,7 @@ class HomeKitGarageDoorCover(HomeKitEntity, CoverEntity):
) )
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the optional state attributes.""" """Return the optional state attributes."""
obstruction_detected = self.service.value( obstruction_detected = self.service.value(
CharacteristicsTypes.OBSTRUCTION_DETECTED CharacteristicsTypes.OBSTRUCTION_DETECTED
@ -235,7 +235,7 @@ class HomeKitWindowCover(HomeKitEntity, CoverEntity):
) )
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the optional state attributes.""" """Return the optional state attributes."""
obstruction_detected = self.service.value( obstruction_detected = self.service.value(
CharacteristicsTypes.OBSTRUCTION_DETECTED CharacteristicsTypes.OBSTRUCTION_DETECTED

View file

@ -63,7 +63,7 @@ class HomeKitLock(HomeKitEntity, LockEntity):
) )
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the optional state attributes.""" """Return the optional state attributes."""
attributes = {} attributes = {}

View file

@ -39,7 +39,7 @@ class HomeKitSwitch(HomeKitEntity, SwitchEntity):
await self.async_put_characteristics({CharacteristicsTypes.ON: False}) await self.async_put_characteristics({CharacteristicsTypes.ON: False})
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the optional state attributes.""" """Return the optional state attributes."""
outlet_in_use = self.service.value(CharacteristicsTypes.OUTLET_IN_USE) outlet_in_use = self.service.value(CharacteristicsTypes.OUTLET_IN_USE)
if outlet_in_use is not None: if outlet_in_use is not None:
@ -77,7 +77,7 @@ class HomeKitValve(HomeKitEntity, SwitchEntity):
return self.service.value(CharacteristicsTypes.ACTIVE) return self.service.value(CharacteristicsTypes.ACTIVE)
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the optional state attributes.""" """Return the optional state attributes."""
attrs = {} attrs = {}

View file

@ -210,9 +210,9 @@ class HomematicipBaseActionSensor(HomematicipGenericEntity, BinarySensorEntity):
return self._device.accelerationSensorTriggered return self._device.accelerationSensorTriggered
@property @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.""" """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(): for attr, attr_key in SAM_DEVICE_ATTRIBUTES.items():
attr_value = getattr(self._device, attr, None) attr_value = getattr(self._device, attr, None)
@ -285,9 +285,9 @@ class HomematicipShutterContact(HomematicipMultiContactInterface, BinarySensorEn
return DEVICE_CLASS_DOOR return DEVICE_CLASS_DOOR
@property @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.""" """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: if self.has_additional_state:
window_state = getattr(self._device, "windowState", None) window_state = getattr(self._device, "windowState", None)
@ -412,9 +412,9 @@ class HomematicipSunshineSensor(HomematicipGenericEntity, BinarySensorEntity):
return self._device.sunshine return self._device.sunshine
@property @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.""" """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) today_sunshine_duration = getattr(self._device, "todaySunshineDuration", None)
if today_sunshine_duration: if today_sunshine_duration:
@ -482,9 +482,9 @@ class HomematicipSecurityZoneSensorGroup(HomematicipGenericEntity, BinarySensorE
return True return True
@property @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.""" """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(): for attr, attr_key in GROUP_ATTRIBUTES.items():
attr_value = getattr(self._device, attr, None) attr_value = getattr(self._device, attr, None)
@ -526,9 +526,9 @@ class HomematicipSecuritySensorGroup(
super().__init__(hap, device, post="Sensors") super().__init__(hap, device, post="Sensors")
@property @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.""" """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) smoke_detector_at = getattr(self._device, "smokeDetectorAlarmType", None)
if smoke_detector_at: if smoke_detector_at:

View file

@ -237,9 +237,9 @@ class HomematicipHeatingGroup(HomematicipGenericEntity, ClimateEntity):
await self._device.set_active_profile(profile_idx) await self._device.set_active_profile(profile_idx)
@property @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.""" """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._device.controlMode == HMIP_ECO_CM:
if self._indoor_climate.absenceType in [ if self._indoor_climate.absenceType in [

View file

@ -232,7 +232,7 @@ class HomematicipGenericEntity(Entity):
return None return None
@property @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.""" """Return the state attributes of the generic entity."""
state_attr = {} state_attr = {}

View file

@ -90,9 +90,9 @@ class HomematicipLightMeasuring(HomematicipLight):
"""Representation of the HomematicIP measuring light.""" """Representation of the HomematicIP measuring light."""
@property @property
def device_state_attributes(self) -> Dict[str, Any]: def extra_state_attributes(self) -> Dict[str, Any]:
"""Return the state attributes of the light.""" """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 current_power_w = self._device.currentPowerConsumption
if current_power_w > 0.05: 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]) return self._color_switcher.get(simple_rgb_color, [0.0, 0.0])
@property @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.""" """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: if self.is_on:
state_attr[ATTR_COLOR_NAME] = self._func_channel.simpleRGBColorState state_attr[ATTR_COLOR_NAME] = self._func_channel.simpleRGBColorState

View file

@ -222,9 +222,9 @@ class HomematicipTemperatureSensor(HomematicipGenericEntity):
return TEMP_CELSIUS return TEMP_CELSIUS
@property @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.""" """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) temperature_offset = getattr(self._device, "temperatureOffset", None)
if temperature_offset: if temperature_offset:
@ -259,9 +259,9 @@ class HomematicipIlluminanceSensor(HomematicipGenericEntity):
return LIGHT_LUX return LIGHT_LUX
@property @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.""" """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(): for attr, attr_key in ILLUMINATION_DEVICE_ATTRIBUTES.items():
attr_value = getattr(self._device, attr, None) attr_value = getattr(self._device, attr, None)
@ -312,9 +312,9 @@ class HomematicipWindspeedSensor(HomematicipGenericEntity):
return SPEED_KILOMETERS_PER_HOUR return SPEED_KILOMETERS_PER_HOUR
@property @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.""" """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) wind_direction = getattr(self._device, "windDirection", None)
if wind_direction is not None: if wind_direction is not None:
@ -354,9 +354,9 @@ class HomematicipPassageDetectorDeltaCounter(HomematicipGenericEntity):
return self._device.leftRightCounterDelta return self._device.leftRightCounterDelta
@property @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.""" """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_LEFT_COUNTER] = self._device.leftCounter
state_attr[ATTR_RIGHT_COUNTER] = self._device.rightCounter state_attr[ATTR_RIGHT_COUNTER] = self._device.rightCounter

View file

@ -141,9 +141,9 @@ class HomematicipGroupSwitch(HomematicipGenericEntity, SwitchEntity):
return True return True
@property @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.""" """Return the state attributes of the switch-group."""
state_attr = super().device_state_attributes state_attr = super().extra_state_attributes
if self._device.unreach: if self._device.unreach:
state_attr[ATTR_GROUP_MEMBER_UNREACHABLE] = True state_attr[ATTR_GROUP_MEMBER_UNREACHABLE] = True

View file

@ -82,7 +82,7 @@ class HomeworksLight(HomeworksDevice, LightEntity):
) )
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Supported attributes.""" """Supported attributes."""
return {"homeworks_address": self._addr} return {"homeworks_address": self._addr}

View file

@ -197,7 +197,7 @@ class HoneywellUSThermostat(ClimateEntity):
return self._device.name return self._device.name
@property @property
def device_state_attributes(self) -> Dict[str, Any]: def extra_state_attributes(self) -> Dict[str, Any]:
"""Return the device specific state attributes.""" """Return the device specific state attributes."""
data = {} data = {}
data[ATTR_FAN_ACTION] = "running" if self._device.fan_running else "idle" data[ATTR_FAN_ACTION] = "running" if self._device.fan_running else "idle"

View file

@ -144,7 +144,7 @@ class HpIloSensor(Entity):
return self._state return self._state
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
return self._state_attributes return self._state_attributes

View file

@ -142,7 +142,7 @@ class HuaweiLteMobileConnectionBinarySensor(HuaweiLteBaseBinarySensor):
return True return True
@property @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.""" """Get additional attributes related to connection status."""
attributes = {} attributes = {}
if self._raw_state in CONNECTION_STATE_ATTRIBUTES: if self._raw_state in CONNECTION_STATE_ATTRIBUTES:

View file

@ -126,11 +126,11 @@ class HuaweiLteScannerEntity(HuaweiLteBaseEntity, ScannerEntity):
_is_connected: bool = attr.ib(init=False, default=False) _is_connected: bool = attr.ib(init=False, default=False)
_hostname: Optional[str] = attr.ib(init=False, default=None) _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: def __attrs_post_init__(self) -> None:
"""Initialize internal state.""" """Initialize internal state."""
self._device_state_attributes["mac_address"] = self.mac self._extra_state_attributes["mac_address"] = self.mac
@property @property
def _entity_name(self) -> str: def _entity_name(self) -> str:
@ -151,9 +151,9 @@ class HuaweiLteScannerEntity(HuaweiLteBaseEntity, ScannerEntity):
return self._is_connected return self._is_connected
@property @property
def device_state_attributes(self) -> Dict[str, Any]: def extra_state_attributes(self) -> Dict[str, Any]:
"""Get additional attributes related to entity state.""" """Get additional attributes related to entity state."""
return self._device_state_attributes return self._extra_state_attributes
async def async_update(self) -> None: async def async_update(self) -> None:
"""Update state.""" """Update state."""
@ -162,6 +162,6 @@ class HuaweiLteScannerEntity(HuaweiLteBaseEntity, ScannerEntity):
self._is_connected = host is not None self._is_connected = host is not None
if host is not None: if host is not None:
self._hostname = host.get("HostName") 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" _better_snakecase(k): v for k, v in host.items() if k != "HostName"
} }

View file

@ -31,9 +31,9 @@ class HuePresence(GenericZLLSensor, BinarySensorEntity):
return self.sensor.presence return self.sensor.presence
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
attributes = super().device_state_attributes attributes = super().extra_state_attributes
if "sensitivity" in self.sensor.config: if "sensitivity" in self.sensor.config:
attributes["sensitivity"] = self.sensor.config["sensitivity"] attributes["sensitivity"] = self.sensor.config["sensitivity"]
if "sensitivitymax" in self.sensor.config: if "sensitivitymax" in self.sensor.config:

View file

@ -535,7 +535,7 @@ class HueLight(CoordinatorEntity, LightEntity):
await self.coordinator.async_request_refresh() await self.coordinator.async_request_refresh()
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
if not self.is_group: if not self.is_group:
return {} return {}

View file

@ -58,9 +58,9 @@ class HueLightLevel(GenericHueGaugeSensorEntity):
return round(float(10 ** ((self.sensor.lightlevel - 1) / 10000)), 2) return round(float(10 ** ((self.sensor.lightlevel - 1) / 10000)), 2)
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
attributes = super().device_state_attributes attributes = super().extra_state_attributes
attributes.update( attributes.update(
{ {
"lightlevel": self.sensor.lightlevel, "lightlevel": self.sensor.lightlevel,

View file

@ -197,6 +197,6 @@ class GenericZLLSensor(GenericHueSensor):
"""Representation of a Hue-brand, physical sensor.""" """Representation of a Hue-brand, physical sensor."""
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
return {"battery_level": self.sensor.battery} return {"battery_level": self.sensor.battery}

View file

@ -111,7 +111,7 @@ class PowerViewShade(ShadeEntity, CoverEntity):
self._current_cover_position = MIN_POSITION self._current_cover_position = MIN_POSITION
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
return {STATE_ATTRIBUTE_ROOM_NAME: self._room_name} return {STATE_ATTRIBUTE_ROOM_NAME: self._room_name}

View file

@ -71,7 +71,7 @@ class PowerViewScene(HDEntity, Scene):
return self._scene.name return self._scene.name
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
return {STATE_ATTRIBUTE_ROOM_NAME: self._room_name} return {STATE_ATTRIBUTE_ROOM_NAME: self._room_name}

View file

@ -174,7 +174,7 @@ class HvvDepartureBinarySensor(CoordinatorEntity, BinarySensorEntity):
return DEVICE_CLASS_PROBLEM return DEVICE_CLASS_PROBLEM
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
if not ( if not (
self.coordinator.last_update_success self.coordinator.last_update_success

View file

@ -199,6 +199,6 @@ class HVVDepartureSensor(Entity):
return DEVICE_CLASS_TIMESTAMP return DEVICE_CLASS_TIMESTAMP
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
return self.attr return self.attr

View file

@ -151,7 +151,7 @@ class HydrawiseEntity(Entity):
] ]
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
return {ATTR_ATTRIBUTION: ATTRIBUTION, "identifier": self.data.get("relay")} return {ATTR_ATTRIBUTION: ATTRIBUTION, "identifier": self.data.get("relay")}

View file

@ -108,7 +108,7 @@ class IcloudTrackerEntity(TrackerEntity):
return icon_for_icloud_device(self._device) return icon_for_icloud_device(self._device)
@property @property
def device_state_attributes(self) -> Dict[str, any]: def extra_state_attributes(self) -> Dict[str, any]:
"""Return the device state attributes.""" """Return the device state attributes."""
return self._device.state_attributes return self._device.state_attributes

View file

@ -91,7 +91,7 @@ class IcloudDeviceBatterySensor(Entity):
) )
@property @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 default attributes for the iCloud device entity."""
return self._device.state_attributes return self._device.state_attributes

View file

@ -238,7 +238,7 @@ class IgnSismologiaLocationEvent(GeolocationEvent):
return LENGTH_KILOMETERS return LENGTH_KILOMETERS
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the device state attributes.""" """Return the device state attributes."""
attributes = {} attributes = {}
for key, value in ( for key, value in (

View file

@ -42,7 +42,7 @@ class IHCDevice(Entity):
return self._name return self._name
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
if not self.info: if not self.info:
return {} return {}

View file

@ -171,7 +171,7 @@ class EmailContentSensor(Entity):
return self._message return self._message
@property @property
def device_state_attributes(self): def extra_state_attributes(self):
"""Return other state attributes for the message.""" """Return other state attributes for the message."""
return self._state_attributes return self._state_attributes

View file

@ -40,6 +40,6 @@ class IncomfortFailed(IncomfortChild, BinarySensorEntity):
return self._heater.status["is_failed"] return self._heater.status["is_failed"]
@property @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 the device state attributes."""
return {"fault_code": self._heater.status["fault_code"]} return {"fault_code": self._heater.status["fault_code"]}

View file

@ -39,7 +39,7 @@ class InComfortClimate(IncomfortChild, ClimateEntity):
self._room = room self._room = room
@property @property
def device_state_attributes(self) -> Dict[str, Any]: def extra_state_attributes(self) -> Dict[str, Any]:
"""Return the device state attributes.""" """Return the device state attributes."""
return {"status": self._room.status} return {"status": self._room.status}

View file

@ -95,6 +95,6 @@ class IncomfortTemperature(IncomfortSensor):
self._unit_of_measurement = TEMP_CELSIUS self._unit_of_measurement = TEMP_CELSIUS
@property @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 the device state attributes."""
return {self._attr: self._heater.status[self._attr]} return {self._attr: self._heater.status[self._attr]}

Some files were not shown because too many files have changed in this diff Show more