Skip to content

Commit bced7d7

Browse files
committed
not all have these
1 parent f0875d2 commit bced7d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

zha/application/platforms/sensor/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1955,7 +1955,9 @@ def entity_description(
19551955
@property
19561956
def extra_state_attribute_names(self) -> set[str] | None:
19571957
"""Return the extra state attribute names."""
1958-
return self.info_object.extra_state_attribute_names
1958+
if hasattr(self.info_object, "extra_state_attribute_names"):
1959+
return self.info_object.extra_state_attribute_names
1960+
return None
19591961

19601962
@property
19611963
def native_value(self) -> date | datetime | str | int | float | None:

0 commit comments

Comments
 (0)