Example #1
0
 def test_set_target_temp_bad_attr(self):
     """Test setting the target temperature without required attribute."""
     state = self.hass.states.get(ENTITY_HVAC)
     self.assertEqual(21, state.attributes.get('temperature'))
     hvac.set_temperature(self.hass, None, ENTITY_HVAC)
     self.hass.pool.block_till_done()
     self.assertEqual(21, state.attributes.get('temperature'))
Example #2
0
 def test_set_target_temp_bad_attr(self):
     """Test setting the target temperature without required attribute."""
     state = self.hass.states.get(ENTITY_HVAC)
     self.assertEqual(21, state.attributes.get('temperature'))
     hvac.set_temperature(self.hass, None, ENTITY_HVAC)
     self.hass.pool.block_till_done()
     self.assertEqual(21, state.attributes.get('temperature'))
Example #3
0
 def test_set_target_temp(self):
     """Test the setting of the target temperature."""
     hvac.set_temperature(self.hass, 30, ENTITY_HVAC)
     self.hass.pool.block_till_done()
     state = self.hass.states.get(ENTITY_HVAC)
     self.assertEqual(30.0, state.attributes.get('temperature'))
Example #4
0
 def test_set_target_temp(self):
     """Test the setting of the target temperature."""
     hvac.set_temperature(self.hass, 30, ENTITY_HVAC)
     self.hass.pool.block_till_done()
     state = self.hass.states.get(ENTITY_HVAC)
     self.assertEqual(30.0, state.attributes.get('temperature'))