Update integrations p-s to override extra_state_attributes() (#47759)
This commit is contained in:
parent
1fc8e32d86
commit
14ff6d4d1f
106 changed files with 144 additions and 146 deletions
|
@ -162,7 +162,7 @@ class SolarEdgeDetailsSensor(SolarEdgeSensor):
|
|||
"""Representation of an SolarEdge Monitoring API details sensor."""
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return self.data_service.attributes
|
||||
|
||||
|
@ -182,7 +182,7 @@ class SolarEdgeInventorySensor(SolarEdgeSensor):
|
|||
self._json_key = SENSOR_TYPES[self.sensor_key][0]
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return self.data_service.attributes.get(self._json_key)
|
||||
|
||||
|
@ -202,7 +202,7 @@ class SolarEdgeEnergyDetailsSensor(SolarEdgeSensor):
|
|||
self._json_key = SENSOR_TYPES[self.sensor_key][0]
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return self.data_service.attributes.get(self._json_key)
|
||||
|
||||
|
@ -232,7 +232,7 @@ class SolarEdgePowerFlowSensor(SolarEdgeSensor):
|
|||
return DEVICE_CLASS_POWER
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
def extra_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
return self.data_service.attributes.get(self._json_key)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue