diff --git a/custom_components/battery_notes/binary_sensor.py b/custom_components/battery_notes/binary_sensor.py index b5cab3672..8d2bfe210 100644 --- a/custom_components/battery_notes/binary_sensor.py +++ b/custom_components/battery_notes/binary_sensor.py @@ -416,7 +416,7 @@ def add_template_attribute( def _async_setup_templates(self) -> None: """Set up templates.""" self.add_template_attribute( - "_state", Template(self._template), None, self._update_state + "_state", Template(self._template, self.hass), None, self._update_state ) @callback