'Test state_as_number with number.'

def test_as_number_coercion(self):

    for _state in ('0', '0.0', 0, 0.0):
        self.assertEqual(0.0, state.state_as_number(ha.State('domain.test', _state, {})))
    for _state in ('1', '1.0', 1, 1.0):
        self.assertEqual(1.0, state.state_as_number(ha.State('domain.test', _state, {})))
