Refactor Rest Binary sensor with ManualTriggerEntity (#97400)

* Refactor Rest Binary sensor w/ ManualTriggerEntity

* test availability

* review comments

* Use super

* Fix config
This commit is contained in:
G Johansson
2023-08-10 12:59:23 +02:00
committed by GitHub
parent 9b74321487
commit 4531dbbe62
4 changed files with 65 additions and 13 deletions

View File

@@ -564,6 +564,7 @@ class TriggerBaseEntity(Entity):
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: