Commit graph

64 commits

Author SHA1 Message Date
G Johansson
3ddef56167
Fix step in presets for generic thermostat (#128922) 2024-10-23 08:13:42 +02:00
epenet
fe2402b611
Add alias to DOMAIN import in tests [e-g] (#125575) 2024-09-09 15:18:28 +02:00
epenet
25d33e96cc
Add missing hass type hint in component tests (g) (#124203) 2024-08-19 00:29:26 -07:00
G Johansson
a913587eb6
Climate validate temperature(s) out of range (#118649)
* Climate temperature out of range

* Fix test sensibo

* use temp converting for min/max

* Fix

* Fix mqtt tests

* Fix honeywell tests

* Fix Balboa tests

* Fix whirlpool test

* Fix teslemetry test

* Fix plugwise test

* Fix tplink test

* Fix generic thermostat test

* Fix modbus test

* Fix fritzbox tests

* Honewell
2024-07-31 19:17:53 +02:00
epenet
02581bbf02
Enforce HOMEASSISTANT_DOMAIN alias for core DOMAIN (#122763) 2024-07-29 22:10:44 +02:00
dougiteixeira
75b1700ed3
Move constants to const.py in generic Thermostat (#120789) 2024-07-19 19:49:11 +02:00
epenet
1eec49696a
Improve type hints in generic_hygrostat/thermostat tests (#121167) 2024-07-04 10:30:17 +02:00
dougiteixeira
8ed11d4b90
Link Generic Thermostat helper entity to actuator entity device (#120767) 2024-06-28 23:37:51 +02:00
Joakim Plate
4d982a9227
Add config flow to generic thermostat (#119930)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-06-22 18:26:39 +02:00
Em
7d44321f0f
Remove duplicate tests in generic_thermostat (#105622)
Tests using `setup_comp_4` and `setup_comp_6` have been replaced by a parameterized tests in #105643. Tests using `setup_comp_5` are therefore still duplicates and are removed.
2024-05-24 12:24:05 +02:00
J. Nick Koston
d321906342
Always run keyed event trackers immediately (#114709) 2024-04-04 15:30:01 -10:00
Jan-Philipp Benecke
c2ffed9b2d
Use switch entities instead of toggle entities in tests (#114585) 2024-04-02 08:25:28 +02:00
Jan-Philipp Benecke
71a0a7fe00
Use setup_test_component_platform helper for switch entity component tests instead of hass.components (#114305)
* Use `setup_test_component_platform` helper for switch entity component tests instead of `hass.components`

* Do not import fixtures

* Re-add switch.py to testing_config as stub

* Rename to mock_toggle_entities
2024-03-28 13:56:23 +01:00
Em
7c4747bb02
Parameterize some tests in generic_thermostat (#105643)
* test(generic_thermostat): parameterize some tests

* refactor: improvements following review
2024-03-13 18:23:52 +01:00
Marc Mueller
32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Minims
597118d584
Add ECO temp to Generic Thermostat (#110471)
feat: add ECO temp to Generic Thermostat.
2024-02-24 20:17:22 +01:00
J. Nick Koston
c399cab427
Small speed up to checking core state (#107845) 2024-01-18 08:41:32 -10:00
G Johansson
83f4d3af5c
Implement mode validation in Climate entity component (#105745)
* Implement mode validation in Climate entity component

* Fix some tests

* more tests

* Fix translations

* fix deconz tests

* Fix switcher_kis tests

* not None

* Fix homematicip_cloud test

* Always validate

* Fix shelly

* reverse logic in validation

* modes_str

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-27 14:51:39 +01:00
Jan-Philipp Benecke
04a497343d
Update f-g* tests to use entity & device registry fixtures (#103841) 2023-11-12 13:07:38 +01:00
Justin Grover
475cb7719b
Add unique ID for generic hygrostat (#101503) 2023-10-06 20:15:40 +02:00
Allen Porter
12129e9d21
Update service call return values and error handling (#94657)
* Update return signature of service calls

* Add timeout error handling in websocket api for service calls

* Update recorder tests to remove assertion on service call

* Remove timeout behavior and update callers that depend on it today

* Fix tests

* Add missing else

* await coro directly

* Fix more tests

* Update the intent task to use wait instead of timeout

* Remove script service call limits and limit constants

* Update tests that depend on service call limits

* Use wait instead of wait_for and add test

* Update homeassistant/helpers/intent.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-16 07:01:40 -07:00
J. Nick Koston
e80579e52f
Update generic_thermostat tests to avoid patching utcnow (#93479) 2023-05-24 13:17:28 -05:00
Franck Nijhof
ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
b68f502769
Add type hints to integration tests (part 7) (#87980) 2023-02-13 09:53:09 +01:00
epenet
7a4d15a657
Add type hints to integration tests (f-g) (#87700) 2023-02-08 13:33:52 +01:00
Franck Nijhof
ca1a12898c
Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
Michael
e5f67c9119
Replace the usage of unit constants by enumerations in Tests [f-g] (#85933) 2023-01-15 14:46:45 +01:00
epenet
e84e5f134e
Use US_CUSTOMARY_SYSTEM in tests (#80658)
* Use US_CUSTOMARY_SYSTEM in tests

* Don't update test_unit_system
2022-10-20 15:42:23 +02:00
epenet
0d696b84b2
Cleanup root component imports in tests (#78893) 2022-09-21 06:57:41 -10:00
J. Nick Koston
ebce5660e3
Sync event timed_fired and the context ulid time (#71854) 2022-05-14 12:12:08 -07:00
epenet
b81f8e75ee
Use climate enums in generic_thermostat (#70656)
* Use climate enums in generic_thermostat

* Adjust tests
2022-04-25 10:58:05 +02:00
J. Nick Koston
f1b400feaf
Revert changes from #70300 part 2 (#70386) 2022-04-21 10:50:00 -10:00
arantes555
a1f33a093c
Generic thermostat temp step (#70303)
* Add target_temp_step to generic_thermostat

* Add target_temp_step to generic_thermostat : fix default + add tests

* Add target_temp_step to generic_thermostat : fix test by using new 'units_imperial' fixture
2022-04-20 01:19:59 +03:00
J. Nick Koston
c08afca912
Revert "Add target_temp_step to generic_thermostat (#58691)" (#70299)
This reverts commit ba4ca3e38e.
2022-04-19 22:46:42 +03:00
arantes555
ba4ca3e38e
Add target_temp_step to generic_thermostat (#58691)
* Add target_temp_step to generic_thermostat

* Add target_temp_step to generic_thermostat : fix default + add tests
2022-04-19 17:16:37 +03:00
Brian Egge
27e3a5ba83
Generic thermostat presets (#56080)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-12-23 14:29:29 -10:00
Paulus Schoutsen
31153ac155
Move fixtures part 1 (#58902) 2021-11-01 20:47:05 -07:00
Brian Egge
8d87f4148b
Fix generic thermostat switch state initialization (#56073) 2021-09-13 22:27:06 +02:00
Brian Egge
c81a319346
Handle unknown preset mode in generic thermostat (#55588)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-09-04 13:17:57 -07:00
Joakim Sørensen
2f10f59717
Block custom integrations with missing or invalid version (#49916) 2021-05-17 15:48:41 +02:00
J. Nick Koston
bf2d40adfe
Migrate from pytz to python-dateutil (#49643)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-05-07 22:46:26 -07:00
Ruslan Sayfutdinov
02764c2f46
Disable strict type checks for tests (#49851) 2021-04-29 15:57:02 +02:00
Erik Montnemery
61b38baf2e
Reject nan, inf from generic_thermostat sensor (#48771) 2021-04-07 09:00:42 -07:00
Franck Nijhof
5a2b5fe7c5
Yoda assertion style removed is (#48142) 2021-03-20 13:55:10 +01:00
javicalle
e798f415a4
Wait for switch startup in generic_thermostat (#45253)
* Better status control on restore

* Better status control on restore

* fix code coverage

* Rollback hvac_mode initialization

I think I have better understood the handling of the `hvac_mode`.
I change the approach. Now the thermostat doesn't initialize until the switch is available.

* fix pyupgrade

* fix black

* Delete test_turn_on_while_restarting

HVAC mode should not be modified by the switch.
IMHO, this test does not make sense because if the switch is turned on the thermostat is not turning on (and not changing HVAC_MODE)

* Re add turn off if HVAC is off

If HVAC_MODE is off thermostat will not control heater switch. This can be because `initial_hvac_mode`, because state defaults to or because old_state.
IMHO it is preferable to be excessively cautious.

* Update climate.py

* Change warning message

* Fix black

* Fix black
2021-03-19 15:42:45 +01:00
Erik Montnemery
87e7cebd36
Update tests c-h to use registry async_get (#47652) 2021-03-09 14:31:17 +01:00
Czapla
14a64ea970
Add generic_thermostat unique ID parameter (#46399)
* Add generic_thermostat unique ID parameter

* Add tests for unique id

* Fix flake8
2021-02-11 19:46:58 +00:00
Franck Nijhof
65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Nigel Rook
1d0b4290fe
Update generic_thermostat current_temperature on startup (#43951)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-12-07 13:14:54 +01:00
Chris Talkington
98db0a2d2e
fix black on generic_thermostat tests (#39350) 2020-08-28 00:24:11 -05:00