mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 06:37:52 +00:00
Remove unnecessary assignment of Template.hass from trigger entity helper (#123709)
This commit is contained in:
parent
5e75c5faff
commit
6caec89793
@ -30,7 +30,7 @@ from homeassistant.util.json import JSON_DECODE_EXCEPTIONS, json_loads
|
|||||||
|
|
||||||
from . import config_validation as cv
|
from . import config_validation as cv
|
||||||
from .entity import Entity
|
from .entity import Entity
|
||||||
from .template import attach as template_attach, render_complex
|
from .template import render_complex
|
||||||
from .typing import ConfigType
|
from .typing import ConfigType
|
||||||
|
|
||||||
CONF_AVAILABILITY = "availability"
|
CONF_AVAILABILITY = "availability"
|
||||||
@ -157,11 +157,6 @@ class TriggerBaseEntity(Entity):
|
|||||||
"""Return extra attributes."""
|
"""Return extra attributes."""
|
||||||
return self._rendered.get(CONF_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:
|
def _set_unique_id(self, unique_id: str | None) -> None:
|
||||||
"""Set unique id."""
|
"""Set unique id."""
|
||||||
self._unique_id = unique_id
|
self._unique_id = unique_id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user