'Test state_as_number with states.'

def test_as_number_states(self):

    zero_states = (STATE_OFF, STATE_CLOSED, STATE_UNLOCKED, STATE_BELOW_HORIZON, STATE_NOT_HOME)
    one_states = (STATE_ON, STATE_OPEN, STATE_LOCKED, STATE_ABOVE_HORIZON, STATE_HOME)
    for _state in zero_states:
        self.assertEqual(0, state.state_as_number(ha.State('domain.test', _state, {})))
    for _state in one_states:
        self.assertEqual(1, state.state_as_number(ha.State('domain.test', _state, {})))
