Пример #1
0
 def test_set_target_humidity_bad_attr(self):
     """Test setting the target humidity without required attribute."""
     state = self.hass.states.get(ENTITY_CLIMATE)
     self.assertEqual(67, state.attributes.get('humidity'))
     climate.set_humidity(self.hass, None, ENTITY_CLIMATE)
     self.hass.pool.block_till_done()
     self.assertEqual(67, state.attributes.get('humidity'))
Пример #2
0
 def test_set_target_humidity_bad_attr(self):
     """Test setting the target humidity without required attribute."""
     state = self.hass.states.get(ENTITY_CLIMATE)
     self.assertEqual(67, state.attributes.get('humidity'))
     climate.set_humidity(self.hass, None, ENTITY_CLIMATE)
     self.hass.pool.block_till_done()
     self.assertEqual(67, state.attributes.get('humidity'))
Пример #3
0
 def test_set_target_humidity(self):
     """Test the setting of the target humidity."""
     state = self.hass.states.get(ENTITY_CLIMATE)
     self.assertEqual(67, state.attributes.get('humidity'))
     climate.set_humidity(self.hass, 64, ENTITY_CLIMATE)
     self.hass.block_till_done()
     state = self.hass.states.get(ENTITY_CLIMATE)
     self.assertEqual(64.0, state.attributes.get('humidity'))
Пример #4
0
 def test_set_target_humidity(self):
     """Test the setting of the target humidity."""
     state = self.hass.states.get(ENTITY_CLIMATE)
     self.assertEqual(67, state.attributes.get('humidity'))
     climate.set_humidity(self.hass, 64, ENTITY_CLIMATE)
     self.hass.pool.block_till_done()
     state = self.hass.states.get(ENTITY_CLIMATE)
     self.assertEqual(64.0, state.attributes.get('humidity'))