'Test state_as_number with invalid cases.'

def test_as_number_invalid_cases(self):

    for _state in ('', 'foo', 'foo.bar', None, False, True, object, object()):
        self.assertRaises(ValueError, state.state_as_number, ha.State('domain.test', _state, {}))
