Add on/off supported feature to climate (#11379)
* Add on/off supported feature to climate * Lint
This commit is contained in:
1 parent
ec700c2cd6
commit
eb00e54eba
5 files changed
+125
-17
No files matched your search
@@ -250,3 +250,20 @@ class TestDemoClimate(unittest.TestCase):
|
||||
self.hass.block_till_done()
|
||||
state = self.hass.states.get(ENTITY_CLIMATE)
|
||||
self.assertEqual('off', state.attributes.get('aux_heat'))
|
||||
|
||||
def test_set_on_off(self):
|
||||
"""Test on/off service."""
|
||||
state = self.hass.states.get(ENTITY_ECOBEE)
|
||||
self.assertEqual('auto', state.state)
|
||||
|
||||
self.hass.services.call(climate.DOMAIN, climate.SERVICE_TURN_OFF,
|
||||
{climate.ATTR_ENTITY_ID: ENTITY_ECOBEE})
|
||||
self.hass.block_till_done()
|
||||
state = self.hass.states.get(ENTITY_ECOBEE)
|
||||
self.assertEqual('off', state.state)
|
||||
|
||||
self.hass.services.call(climate.DOMAIN, climate.SERVICE_TURN_ON,
|
||||
{climate.ATTR_ENTITY_ID: ENTITY_ECOBEE})
|
||||
self.hass.block_till_done()
|
||||
state = self.hass.states.get(ENTITY_ECOBEE)
|
||||
self.assertEqual('auto', state.state)
|
||||
Reference in new issue
Block a user