-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional persistence in generic_thermostat #10636
Changes from 8 commits
43ae96b
79b90a2
9ff4021
ad51e4b
106c50b
b9cb475
30a11ec
81f9121
0d9c404
ef8db94
56471bd
2b9625c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,7 +88,6 @@ def test_setup_with_sensor(self): | |
|
||
class TestGenericThermostatHeaterSwitching(unittest.TestCase): | ||
"""Test the Generic thermostat heater switching. | ||
|
||
Different toggle type devices are tested. | ||
""" | ||
|
||
|
@@ -335,7 +334,6 @@ def test_invalid_operating_mode(self, log_mock): | |
|
||
def test_operating_mode_auto(self): | ||
"""Test change mode from OFF to AUTO. | ||
|
||
Switch turns on when temp below setpoint and mode changes. | ||
""" | ||
climate.set_operation_mode(self.hass, STATE_OFF) | ||
|
@@ -901,6 +899,7 @@ def test_restore_state(hass): | |
"""Ensure states are restored on startup.""" | ||
mock_restore_cache(hass, ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. undefined name 'mock_restore_cache' |
||
State('climate.test_thermostat', '0', {ATTR_TEMPERATURE: "20"}), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. undefined name 'State' |
||
State('climate.test_thermostat', '0', {'operation_mode': STATE_OFF}), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. undefined name 'State' |
||
)) | ||
|
||
hass.state = CoreState.starting | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. undefined name 'CoreState' |
||
|
@@ -911,7 +910,9 @@ def test_restore_state(hass): | |
'name': 'test_thermostat', | ||
'heater': ENT_SWITCH, | ||
'target_sensor': ENT_SENSOR, | ||
'persistence': 'both', | ||
}}) | ||
|
||
state = hass.states.get('climate.test_thermostat') | ||
assert(state.attributes[ATTR_TEMPERATURE] == 20) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. undefined name 'ATTR_TEMPERATURE' |
||
assert(state.attributes['operation_mode'] == STATE_OFF) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redefinition of unused 'async_added_to_hass' from line 129