Skip to content

Commit

Permalink
refactor!: Re-add extra_state_attributes as a property function
Browse files Browse the repository at this point in the history
Drop support for HA version less than 2021.12.0
  • Loading branch information
zachowj committed Dec 19, 2021
1 parent 1693928 commit 541297d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/nodered/__init__.py
Expand Up @@ -143,7 +143,7 @@ def unit_of_measurement(self) -> Optional[str]:
return self._config.get(CONF_UNIT_OF_MEASUREMENT)

@property
def device_state_attributes(self) -> Optional[Dict[str, Any]]:
def extra_state_attributes(self) -> Optional[Dict[str, Any]]:
"""Return the state attributes."""
return self.attr

Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Expand Up @@ -5,6 +5,6 @@
"sensor",
"switch"
],
"homeassistant": "0.96.0",
"homeassistant": "2021.12.0",
"iot_class": "local_push"
}

0 comments on commit 541297d

Please sign in to comment.