Skip to content

Commit

Permalink
Improve type hints in template (home-assistant#87172)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored Feb 2, 2023
1 parent 9327947 commit 98198d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions homeassistant/components/template/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,11 @@ def rewrite_legacy_to_modern_conf(cfg: dict[str, dict]) -> list[dict]:

@callback
def _async_create_template_tracking_entities(
async_add_entities, hass, definitions: list[dict], unique_id_prefix: str | None
):
async_add_entities: AddEntitiesCallback,
hass: HomeAssistant,
definitions: list[dict],
unique_id_prefix: str | None,
) -> None:
"""Create the template binary sensors."""
sensors = []

Expand Down
7 changes: 5 additions & 2 deletions homeassistant/components/template/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,11 @@ def rewrite_legacy_to_modern_conf(cfg: dict[str, dict]) -> list[dict]:

@callback
def _async_create_template_tracking_entities(
async_add_entities, hass, definitions: list[dict], unique_id_prefix: str | None
):
async_add_entities: AddEntitiesCallback,
hass: HomeAssistant,
definitions: list[dict],
unique_id_prefix: str | None,
) -> None:
"""Create the template sensors."""
sensors = []

Expand Down

0 comments on commit 98198d3

Please sign in to comment.