Commit Graph

35 Commits (0fe5baa4255fe5a4f879b2ad031335d6ab199c69)

Author SHA1 Message Date
Tomasz e9f6bc7364
Add missing return type to async_unload_entry and async_setup_entry (#57115) 2021-10-06 10:48:11 +02:00
Thibaut 5c07fb51a2
Update Somfy to reduce calls to /site entrypoint (#51572)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-06 18:48:48 +02:00
tkdrob d1c4d0de49
Use bool annotations for setup entries (#51166) 2021-05-27 17:39:06 +02:00
Ruslan Sayfutdinov 016abda12e
Pylint plugin to check that relative imports are used (#50937)
* Pylint plugin to check that relative imports are used

* Fix existing sites

* Update description message

* Fix typo
2021-05-22 09:15:30 +01:00
J. Nick Koston 87420627a8
Reduce config entry setup/unload boilerplate Q-S (#49778) 2021-04-27 22:10:04 +02:00
Thibaut f7b72669dc
Don't mark Somfy devices as unavailable (#49662)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-04-25 10:28:31 -10:00
jan iversen 2e084f260e
Rename HomeAssistantType —> HomeAssistant, integrations s* - t* (#49550) 2021-04-22 16:21:38 +02:00
J. Nick Koston a851bff95a
Create async_config_entry_first_refresh to reduce coordinator boilerplate (#48451) 2021-03-29 12:51:39 -10:00
Quentame 198ecb0945
Uniformize platform setup (#47101)
* A platform is not a component

* Fix dynalite

* SUPPORTED_PLATFORMS --> PLATFORMS

* In tests

* In tests 2

* Fix SmartThings

* Fix ZHA test

* Fix Z-Wave

* Revert Z-Wave

* Use PLATFORMS const in ambient_station

* Fix ihc comment
2021-03-02 21:43:59 +01:00
tkdrob da4cb6d294
Use core constants for somfy (#46466) 2021-02-12 23:25:15 +01:00
Mick Vleeshouwer 1d94c10bb5
Change via_hub to via_device (#45804) 2021-01-31 20:55:18 -10:00
Thibaut dc79d71f39
Handle missing Somfy devices during update (#44425)
* Handle missing devices during update

* Raise error only if there was devices previously

* Not final dot

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-12-25 22:29:23 +01:00
Thibaut 524db33f13
Add Somfy battery sensor (#44311)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-12-17 16:46:22 +01:00
Thibaut 03bfc3bcf0
Add Somfy climate platform (#43895)
* Add climate platform
* Upgrade pymfy to 0.9.3
2020-12-15 07:04:35 -08:00
Thibaut b272e16b44
Fix RTS cover with set position available (#43555) 2020-11-23 08:13:52 -10:00
J. Nick Koston 3c8c5a814b
Fix somfy device recreation on update (#42462)
* Fix somfy device recreation on update

If all devices are assumed state, only update every hour
to ensure the token is refreshed

* pylint
2020-10-27 19:57:22 -05:00
J. Nick Koston df25feab37
Convert somfy to use DataUpdateCoordinator (#42434) 2020-10-26 23:42:12 -05:00
J. Nick Koston 325b66c41c
Restore somfy state in optimistic mode on restart (#42426) 2020-10-26 17:15:39 -05:00
Paulus Schoutsen 4968a12b6c
Reduce Somfy polling (#41389) 2020-10-07 13:49:45 +02:00
Thibaut 61f919b18c
Handle somfy error 404 during setup (#41298) 2020-10-06 15:02:03 +02:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Quentame 1855c91988
Use CONF_CLIENT_ID & CONF_CLIENT_SECRET from homeassistant.const (#36233)
* Use CONF_CLIENT_ID & CONF_CLIENT_SECRET from homeassistant.const

* Fix pylint

* Use in tests

* Search for "client_id"

* Fix tests

* Fix test

* Fix test
2020-05-30 17:27:20 +02:00
tetienne 3815d7d74f
Add Somfy hub as device (#35209) 2020-05-17 16:14:11 -05:00
tetienne 5a2aabea9c
Fix somfy optimistic mode when missing in conf (#32995)
* Fix optimistic mode when missing in conf #32971

* Ease code using a default value

* Client id and secret are now inclusive
2020-03-19 16:09:14 -07:00
Colin Robbins 0431b983d2
Add optimistic mode for somfy covers that do not support position (#31407)
* Add a shadow for covers that do not support postion

* Rename shadow as optimistic

* Set optimisic default mode

* fix black error

* Remove redundant check

* optimisitc variable name consistency with config
2020-03-01 16:42:26 +01:00
springstan 1ee7c483a7
Update file headers and outdated documentation links (#32022)
* Update documentation links

* Update file headers v2
2020-02-20 15:29:46 -08:00
Bas Nijholt ad58e607df Sort imports according to PEP8 for somfy (#29675) 2019-12-09 12:07:10 +01:00
tetienne 97cb8a3745 Increase somfy SCAN_INTERVAL (#29524)
- There was too many errors 504
2019-12-05 21:33:56 +01:00
tetienne 4e107a2bcf Add support for Somfy Camera Shutter (#29057) 2019-11-28 10:42:17 +01:00
Paulus Schoutsen d9edd42532
Update to latest Somfy changes (#28207)
* Update to latest Somfy changes

* Update api.py

* Update api.py
2019-11-06 10:55:56 -08:00
Paulus Schoutsen b6c26cb363
Introduce new OAuth2 config flow helper (#27727)
* Refactor the Somfy auth implementation

* Typing

* Migrate Somfy to OAuth2 flow helper

* Add tests

* Add more tests

* Fix tests

* Fix type error

* More tests

* Remove side effect from constructor

* implementation -> auth_implementation

* Make get_implementation async

* Minor cleanup + Allow picking implementations.

* Add support for extra authorize data
2019-10-18 13:06:33 -07:00
Franck Nijhof d4a67e3a30 Update documentation link URL for integrations (part2) (#27117) 2019-10-02 09:34:07 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
tetienne a012c61762 Handle somfy expired token (#25195)
* HANDLE expired token

* RENAME constant

* FIX typo
2019-07-17 11:09:46 -04:00
tetienne 0a7919a279 Somfy open api (#19548)
* CREATE Somfy component

* CREATE cover Somfy platform

* USE somfy id as unique id

* UPDATE all the devices in one call to limit the number of call

* FIX Don't load devices if not yet configured

* IMP Replace configurator by a simple notification

* ADD log in case state does not match

* IMP wording

* REMOVE debug stuf

* ADD support for tilt position

* UPDATE requirements

* FIX Use code instead of authorization response

 - Will allow to setup Somfy without https

* HANDLE stateless devices (Somfy RTS)

* FIX import locally 3rd party library

* UPDATE pymfy to 0.4.3

* ADD missing docstring

* FIX For Somfy 100 means closed and 0 opened

* FIX position can be None

* ENHANCE error management when error 500 occurs at setup

* FIX indent

* ROLLBACK tilt modification

 - See https://community.home-assistant.io/t/somfy-tahoma-official-api/61448/90?u=tetienne

* FIX Look for capability instead of state

* DON'T use exception to test if a feature is available

* UPDATE dependency

* ADD device_info property

* AVOID object creation in each method

* REMOVE unused constants

* ADD missing doc

* IMP Only make one call to add_entities

* USE dict[key] instead of get method

* IMP Don't pass hass object to the entities

* FIX Don't end logging messages with period

* USE config entries instead of a cache file

* IMPLEMENT async_unload_entry

* CONSOLIDATE package

 - see home-assistant/architecture#124

* UPDATE to pymfy 0.5.1

* SIMPLIFY config flow

* ADD French translation

* FIX 80 vs 79 max length

* ABORT flow asap

* FIX A tupple was returned

* MIGRATE to manifest.json

* ADD a placeholder async_setup_platform coroutine

 - It's currently required and expected by the platform helper.

* FIX codeowner

* ADD missing translations file

* USE new external step

* UPGRADE pymfy version

* Close Somfy tab automatically

* ADD manufacturer

  - Somfy only for the moment.

* HANDLE missing code or state in Somfy request

* REMOVE unused strings

* DECLARE somfy component to use config_flow

* APPLY static check remarks

* FIX async method cannot be called from sync context

* FIX only unload what has been loaded during entry setup

* DON't catch them all

* DON'T log full stacktrace

* ABORT conflig flow if configuration missing

* OMIT Somfy files for coverage

* ADD tests about Somfy config flow

* ADD pymfy to the test dependencies
2019-06-11 08:45:34 -07:00