Add type ignore error codes [helpers] (#66776)
This commit is contained in:
parent
0188e8b319
commit
bfb1abd3a2
12 changed files with 25 additions and 23 deletions
|
@ -836,7 +836,7 @@ def _state_generator(hass: HomeAssistant, domain: str | None) -> Generator:
|
|||
def _get_state_if_valid(hass: HomeAssistant, entity_id: str) -> TemplateState | None:
|
||||
state = hass.states.get(entity_id)
|
||||
if state is None and not valid_entity_id(entity_id):
|
||||
raise TemplateError(f"Invalid entity ID '{entity_id}'") # type: ignore
|
||||
raise TemplateError(f"Invalid entity ID '{entity_id}'") # type: ignore[arg-type]
|
||||
return _get_template_state_from_state(hass, entity_id, state)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue