def __init__(self, hass: HomeAssistant, state: State, collect: bool=True) -> None:
    'Initialize template state.'
    self._hass = hass
    self._state = state
    self._collect = collect
Initialize template state.
def __init__(self, hass: HomeAssistant, state: State, collect: bool=True) -> None:
    
    self._hass = hass
    self._state = state
    self._collect = collect