Commit Graph

20 Commits (460c05dc43b43e42a2a513462c976128dc612928)

Author SHA1 Message Date
Joost Lekkerkerker b9281327c4
Use FlowResultType enum in config flow tests A-M (#114681) 2024-04-03 09:21:17 +02:00
Joost Lekkerkerker 5d500cb74b
Use is in enum comparison in config flow tests K-O (#114672) 2024-04-02 11:21:42 -10:00
Marc Mueller 1722e23df8
Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
Marc Mueller a9147cf3dd
Use builtin TimeoutError [k-n] (#109681) 2024-02-05 12:08:18 +01:00
Jan Bouwhuis 3e72c346b7
Remove MELCloud YAML import support (#108113) 2024-01-16 13:29:26 +01:00
Erwin Douna 7a9c3819e0
Add MELCloud token refresh upon firmware upgrade (#104391)
* Adding initial setup

* Update homeassistant/components/melcloud/__init__.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Adding ConfigEntryNotReady exception

* Update homeassistant/components/melcloud/__init__.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update homeassistant/components/melcloud/config_flow.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update homeassistant/components/melcloud/__init__.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Placing exception handling in setup_entry

* Expanding test cases

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-12-02 23:07:06 +01:00
G Johansson a22aa285d3
Fix Melcloud import issue (#97673)
* Fix Melcloud import issue

* remove old issue

* Simplify

* Update homeassistant/components/melcloud/strings.json

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/melcloud/strings.json

* Update homeassistant/components/melcloud/strings.json

* Apply suggestions from code review

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-08-05 17:00:33 +02: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 6c430e03bc
Add type hints to integration tests (part 14) (#88005) 2023-02-15 10:31:43 +01:00
Ville Skyttä 77120a5137
Use http.HTTPStatus in components/m* (#58251) 2021-10-22 23:54:36 +02:00
Marc Mueller 14c257e1b7
Use EntityDescription - melcloud (#53572)
* Use EntityDescription - melcloud

* Fix pylint errors

* Fix test

* Fix coverage exclude comments
2021-07-28 00:07:14 +02:00
Daniel Hjelseth Høyer ba7ad8a58f
Add Melcloud device class and state class (#52276) 2021-06-29 19:16:43 +02:00
Vilppu Vuorinen 4ba5a4f36e
Fix unique_id generation for AtwZoneSensors (#51227) 2021-06-28 12:20:40 +02:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Paulus Schoutsen 1c36bf5e19
Fix block till done in create entry config flow tests (#42290) 2020-10-24 16:20:56 +02:00
Chris Talkington dfa18b4b6a
Fix unmocked calls in melcloud (#39170)
* fix unmocked calls in melcloud

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py
2020-08-22 18:31:53 -05:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
springstan bc26be3c11
Add and use HTTP_FORBIDDEN constant (#33839) 2020-04-09 17:41:17 +02:00
springstan fb8f8133a0
Use HTTP_INTERNAL_SERVER_ERROR constant (#33832) 2020-04-08 23:20:03 +02:00
Vilppu Vuorinen b78d156f0e
Add MELCloud integration (#30712)
* Add MELCloud integration

* Provides a climate and sensor platforms. Multiple platforms on one go
is not the best option, but it does not make sense to remove them and
commit them later either.

* Email and access token are stored to the ConfigEntry. The token can be
updated by adding the integration again with the same email address. The
config flow is aborted and the update is performed on the background.

* Run isort

* Fix pylint errors

* Run black

* Increase coverage

* Update pymelcloud dependency

* Add HVAC_MODE_OFF emulation

* Remove print

* Update pymelcloud to enable device type filtering

* Collapse except blocks and chain ClientNotReadys

* Add preliminary documentation URL

* Use list comp for creating model info

Filters out empty model names form units.

* f-string galore

Dropped 'HVAC' from AtaDevice name template.

* Delegate fan mode mapping to pymelcloud

* Fix type annotation

* Access AtaDevice through self._device

* Prefer list comprehension

* Update pymelcloud to leverage device type grouping

The updated backend lib returns devices in a dict grouped by the device
type. The devices do not necessarily need to be in a single list and
this way isinstance is not required to extract devices by type.

* Remove DOMAIN presence check

This does not seem to make much sense after all.

* Fix async_setup_entry

Entry setup used half-baked naming from few experimentations back.
The naming conventiens were unified to match the platforms.

A redundant noneness check was also removed after evaluating the
possible return values from the backend lib.

* Simplify empty model name check

* Improve config validation

* Use config_validation strings.

* Add CONF_EMAIL to config schema. The value is not strictly required
when configuring through configuration.yaml, but having it there makes
things more consistent.

* Use dict[key] to access required properties.

* Add DOMAIN in config check back to async_setup. This is required if an
integration is configured throught config_flow.

* Remove unused manifest properties

* Remove redundant ClimateDevice property override

* Add __init__.py to coverage exclusion

* Use CONF_USERNAME instead of CONF_EMAIL

* Use asyncio.gather instead of asyncio.wait

* Misc fixes

* any -> Any

* Better names for dict iterations

* Proper dict access with mandatory/known keys

* Remove unused 'name' argument

* Remove unnecessary platform info from unique_ids

* Remove redundant methods from climate platform

* Remove redundant default value from dict get

* Update ConfigFlow sub-classing

* Define sensors in a dict instead of a list

* Use _abort_if_unique_id_configured to update token

* Fix them tests

* Remove current state guards

* Fix that gather call

* Implement sensor definitions without str manipulation

* Use relative intra-package imports

* Update homeassistant/components/melcloud/config_flow.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-02-10 22:09:12 +01:00