Skip to content

Commit

Permalink
On Unload, only remove from recorder_prefilter if Extended Attr true
Browse files Browse the repository at this point in the history
  • Loading branch information
Snuffy2 committed Jul 4, 2023
1 parent 371b053 commit 9a0726c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/places/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ async def async_will_remove_from_hass(self) -> None:
f"({self.get_attr(CONF_NAME)}) JSON sensor file removed: "
+ f"{self.get_attr(ATTR_JSON_FILENAME)}"
)
if RECORDER_INSTANCE in self._hass.data:
if RECORDER_INSTANCE in self._hass.data and self.get_attr(CONF_EXTENDED_ATTR):
_LOGGER.debug(
f"({self._attr_name}) Removing entity exclusion from recorder: {self.entity_id}"
)
Expand Down

0 comments on commit 9a0726c

Please sign in to comment.