Improve type hints in template (#74294)

This commit is contained in:
epenet 2022-07-01 19:05:37 +02:00 committed by GitHub
parent 72917f1d2c
commit 9211ba8371
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 27 deletions

View file

@ -211,7 +211,7 @@ class SensorTemplate(TemplateSensor):
ENTITY_ID_FORMAT, object_id, hass=hass
)
async def async_added_to_hass(self):
async def async_added_to_hass(self) -> None:
"""Register callbacks."""
self.add_template_attribute(
"_attr_native_value", self._template, None, self._update_state