Remove unnecessary assignment of Template.hass from trigger entity helper (#123709)

This commit is contained in:
Erik Montnemery 2024-08-12 21:50:50 +02:00 committed by GitHub
parent 5e75c5faff
commit 6caec89793
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,7 +30,7 @@ from homeassistant.util.json import JSON_DECODE_EXCEPTIONS, json_loads
from . import config_validation as cv
from .entity import Entity
from .template import attach as template_attach, render_complex
from .template import render_complex
from .typing import ConfigType
CONF_AVAILABILITY = "availability"
@ -157,11 +157,6 @@ class TriggerBaseEntity(Entity):
"""Return extra attributes."""
return self._rendered.get(CONF_ATTRIBUTES)
async def async_added_to_hass(self) -> None:
"""Handle being added to Home Assistant."""
await super().async_added_to_hass()
template_attach(self.hass, self._config)
def _set_unique_id(self, unique_id: str | None) -> None:
"""Set unique id."""
self._unique_id = unique_id