Skip to content

Commit

Permalink
switch to extra state attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
siku2 authored Dec 22, 2021
1 parent e8a304f commit 6d39ad5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/airthings/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "airthings",
"name": "Airthings",
"version": "0.2.5",
"version": "0.2.6",
"config_flow": true,
"dependencies": [],
"codeowners": [
Expand Down
4 changes: 2 additions & 2 deletions custom_components/airthings/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def state(self) -> Optional[float]:
return round(self._sensor.mult * sensor.value, 2)

@property
def device_state_attributes(self) -> Optional[Dict[str, Any]]:
def extra_state_attributes(self) -> Optional[Dict[str, Any]]:
sensor = self.__current_sensor
if sensor is None:
return None
Expand Down Expand Up @@ -230,7 +230,7 @@ def state(self) -> Optional[int]:
return self.__battery_precentage

@property
def device_state_attributes(self) -> Optional[Dict[str, Any]]:
def extra_state_attributes(self) -> Optional[Dict[str, Any]]:
info = self._state.info
return {
"latest_sample": info.latest_sample,
Expand Down

0 comments on commit 6d39ad5

Please sign in to comment.