diff --git a/custom_components/thermal_comfort/manifest.json b/custom_components/thermal_comfort/manifest.json index 1f5c8fb..3e0115e 100644 --- a/custom_components/thermal_comfort/manifest.json +++ b/custom_components/thermal_comfort/manifest.json @@ -1,7 +1,7 @@ { "domain": "thermal_comfort", "name": "Thermal Comfort", - "version": "1.3.0", + "version": "1.3.1", "documentation": "https://github.com/dolezsa/thermal_comfort/blob/master/README.md", "issue_tracker": "https://github.com/dolezsa/thermal_comfort/issues", "codeowners": ["@dolezsa"], diff --git a/custom_components/thermal_comfort/sensor.py b/custom_components/thermal_comfort/sensor.py index 6ca07bc..98016d7 100644 --- a/custom_components/thermal_comfort/sensor.py +++ b/custom_components/thermal_comfort/sensor.py @@ -279,6 +279,10 @@ def extra_state_attributes(self): async def async_added_to_hass(self): """Register callbacks.""" self._device.sensors.append(self) + if self._icon_template is not None: + self._icon_template.hass = self.hass + if self._entity_picture_template is not None: + self._entity_picture_template.hass = self.hass async def async_update(self): """Update the state of the sensor."""