Commit Graph

25 Commits (f13f4a48512d64796058462aa76a8ea234abe1b6)

Author SHA1 Message Date
epenet c7739a7760
Align async_step_reconfigure type hints () 2024-10-03 17:54:51 +02:00
epenet 5a4cdaf348
Use _get_reauth/reconfigure_entry in melcloud () 2024-10-02 19:50:00 +02:00
epenet 46405d7738
Improve type hints in config_flow reconfigure step () 2024-10-01 22:21:54 +02:00
Erwin Douna 6e15c06aa9
Melcloud add reconfigure flow () 2024-06-22 11:25:42 +02:00
Marc Mueller 59a6035d3f
Add empty line after module docstring [j-m] () 2024-03-08 09:01:29 -05:00
Erik Montnemery 52e7912caf
Migrate integrations i-m to generic flowhandler () 2024-02-29 20:08:46 +01:00
Joost Lekkerkerker 730d805876
Enable SIM114 ruff rule () 2024-02-23 13:21:59 +01:00
Marc Mueller a9147cf3dd
Use builtin TimeoutError [k-n] () 2024-02-05 12:08:18 +01:00
Jan Bouwhuis 3e72c346b7
Remove MELCloud YAML import support () 2024-01-16 13:29:26 +01:00
Erwin Douna 0dc61b3493
Add typing in Melcloud config flow ()
* Add typing in config flow

* Patching functions with typing
2023-12-11 20:30:19 +01:00
Erwin Douna 7a9c3819e0
Add MELCloud token refresh upon firmware upgrade ()
* 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
Marc Mueller 71d985e4d6
Use asyncio.timeout [i-n] () 2023-08-15 14:32:15 +02:00
G Johansson a22aa285d3
Fix Melcloud import issue ()
* 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 20bdcc7fff
Replace hass.helpers: async_get_clientsession() () 2022-01-11 17:33:50 +01:00
J. Nick Koston 10d6247fee
Bump to aiohttp 3.8.0 () 2021-11-04 10:07:50 -05:00
Ville Skyttä 77120a5137
Use http.HTTPStatus in components/m* () 2021-10-22 23:54:36 +02:00
Marc Mueller 4f8148f9ea
Use assignment expressions 07 () 2021-10-17 20:24:34 +02:00
Marc Mueller 48bada5a18
Update pylint to 2.11.1 () 2021-09-18 13:52:59 +02:00
Franck Nijhof a6206b2819
Clean up connection classes in integrations M-O () 2021-04-30 21:03:37 -10:00
Marc Mueller 2956eb0902
Update pylint to 2.7.3 ()
* Update pylint to 2.7.3

* Add class-const-naming-style

* Remove unused-import message

* Additional cleanup
2021-03-29 18:02:56 -10:00
Marc Mueller 25a13d1554
Update typing 10 () 2021-03-18 13:07:04 +01:00
Philip Allgaier 625bbe6238
Cleanup unused loggers (components A-M) () 2020-10-12 16:59:05 +02:00
springstan db582bdc1b
Use http status constants more, add HTTP_ACCEPTED and HTTP_BAD_GATEWAY ()
* Use http status codes and add HTTP_BAD_GATEWAY constant

* Address review comments:
 - using constants in tado integration
 - using constant in media_player init.py

* Add and use HTTP_ACCEPTED constant
2020-09-15 20:01:07 +03:00
springstan bc26be3c11
Add and use HTTP_FORBIDDEN constant () 2020-04-09 17:41:17 +02:00
Vilppu Vuorinen b78d156f0e
Add MELCloud integration ()
* 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