def __call__(self, entity_id):
    'Return the states.'
    state = _get_state(self._hass, entity_id)
    return (STATE_UNKNOWN if (state is None) else state.state)
Return the states.
def __call__(self, entity_id):
    
    state = _get_state(self._hass, entity_id)
    return (STATE_UNKNOWN if (state is None) else state.state)