Exemplo n.º 1
0
 def test_set_swing_mode_bad_attr(self):
     """Test setting swing mode without required attribute."""
     state = self.hass.states.get(ENTITY_HVAC)
     self.assertEqual("Off", state.attributes.get('swing_mode'))
     hvac.set_swing_mode(self.hass, None, ENTITY_HVAC)
     self.hass.pool.block_till_done()
     self.assertEqual("Off", state.attributes.get('swing_mode'))
Exemplo n.º 2
0
 def test_set_swing_mode_bad_attr(self):
     """Test setting swing mode without required attribute."""
     state = self.hass.states.get(ENTITY_HVAC)
     self.assertEqual("Off", state.attributes.get('swing_mode'))
     hvac.set_swing_mode(self.hass, None, ENTITY_HVAC)
     self.hass.pool.block_till_done()
     self.assertEqual("Off", state.attributes.get('swing_mode'))
Exemplo n.º 3
0
 def test_set_swing(self):
     """Test setting of new swing mode."""
     hvac.set_swing_mode(self.hass, "Auto", ENTITY_HVAC)
     self.hass.pool.block_till_done()
     state = self.hass.states.get(ENTITY_HVAC)
     self.assertEqual("Auto", state.attributes.get('swing_mode'))
Exemplo n.º 4
0
 def test_set_swing(self):
     """Test setting of new swing mode."""
     hvac.set_swing_mode(self.hass, "Auto", ENTITY_HVAC)
     self.hass.pool.block_till_done()
     state = self.hass.states.get(ENTITY_HVAC)
     self.assertEqual("Auto", state.attributes.get('swing_mode'))