mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix ecobee flaky test (#25019)
This commit is contained in:
parent
662e0dde80
commit
0b7a901c81
@ -1,4 +1,5 @@
|
|||||||
"""Support for Ecobee Thermostats."""
|
"""Support for Ecobee Thermostats."""
|
||||||
|
import collections
|
||||||
import logging
|
import logging
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
@ -31,13 +32,14 @@ PRESET_HOLD_NEXT_TRANSITION = 'next_transition'
|
|||||||
PRESET_HOLD_INDEFINITE = 'indefinite'
|
PRESET_HOLD_INDEFINITE = 'indefinite'
|
||||||
AWAY_MODE = 'awayMode'
|
AWAY_MODE = 'awayMode'
|
||||||
|
|
||||||
ECOBEE_HVAC_TO_HASS = {
|
# Order matters, because for reverse mapping we don't want to map HEAT to AUX
|
||||||
'auxHeatOnly': HVAC_MODE_HEAT,
|
ECOBEE_HVAC_TO_HASS = collections.OrderedDict([
|
||||||
'heat': HVAC_MODE_HEAT,
|
('heat', HVAC_MODE_HEAT),
|
||||||
'cool': HVAC_MODE_COOL,
|
('cool', HVAC_MODE_COOL),
|
||||||
'off': HVAC_MODE_OFF,
|
('auto', HVAC_MODE_AUTO),
|
||||||
'auto': HVAC_MODE_AUTO,
|
('off', HVAC_MODE_OFF),
|
||||||
}
|
('auxHeatOnly', HVAC_MODE_HEAT),
|
||||||
|
])
|
||||||
|
|
||||||
PRESET_TO_ECOBEE_HOLD = {
|
PRESET_TO_ECOBEE_HOLD = {
|
||||||
PRESET_HOLD_NEXT_TRANSITION: 'nextTransition',
|
PRESET_HOLD_NEXT_TRANSITION: 'nextTransition',
|
||||||
|
@ -203,7 +203,7 @@ class TestEcobee(unittest.TestCase):
|
|||||||
self.data.reset_mock()
|
self.data.reset_mock()
|
||||||
self.thermostat.set_hvac_mode('heat')
|
self.thermostat.set_hvac_mode('heat')
|
||||||
self.data.ecobee.set_hvac_mode.assert_has_calls(
|
self.data.ecobee.set_hvac_mode.assert_has_calls(
|
||||||
[mock.call(1, 'auxHeatOnly')])
|
[mock.call(1, 'heat')])
|
||||||
|
|
||||||
def test_set_fan_min_on_time(self):
|
def test_set_fan_min_on_time(self):
|
||||||
"""Test fan min on time setter."""
|
"""Test fan min on time setter."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user