Skip to content
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

Somfy open api #19548

Merged
merged 61 commits into from
Jun 11, 2019
Merged

Somfy open api #19548

merged 61 commits into from
Jun 11, 2019

Conversation

tetienne
Copy link
Contributor

@tetienne tetienne commented Dec 23, 2018

Description:

This component use the official Somfy to manipulate their devices. I've been in contact with support several times to got missing information. For the moment, I've implemented only for HASS the main component and the cover platform. But the python library support all the devices reported by the API.

Pull request in home-assistant.io with documentation: home-assistant/home-assistant.io#9625

Example entry for configuration.yaml:

somfy:
  client_id: xxxxx
  client_secret: xxxx

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

@homeassistant
Copy link
Contributor

Hi @thibaut-sticky,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@tetienne
Copy link
Contributor Author

Hi, this is my first contribution for HASS. I've tried to do my best to create clean code. Any advice or remark are welcome.

@homeassistant
Copy link
Contributor

Hi @thibaut-sticky,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@frenck
Copy link
Member

frenck commented Dec 25, 2018

Could not find a matching documentation PR in our documentation repository. Adding docs-missing label.

tetienne added a commit to tetienne/home-assistant.io that referenced this pull request Jan 3, 2019
tetienne added a commit to tetienne/home-assistant.io that referenced this pull request Jan 4, 2019
@tetienne
Copy link
Contributor Author

tetienne commented Jan 4, 2019

@frenck I've linked the PR to the documentation.

homeassistant/components/cover/somfy.py Outdated Show resolved Hide resolved
homeassistant/components/somfy/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/somfy/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/somfy/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/cover/somfy.py Outdated Show resolved Hide resolved
homeassistant/components/cover/somfy.py Outdated Show resolved Hide resolved
homeassistant/components/cover/somfy.py Outdated Show resolved Hide resolved
homeassistant/components/cover/somfy.py Outdated Show resolved Hide resolved
homeassistant/components/somfy/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/somfy/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/somfy/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/somfy/__init__.py Show resolved Hide resolved
homeassistant/components/somfy/__init__.py Outdated Show resolved Hide resolved
@tetienne tetienne requested a review from a team as a code owner January 30, 2019 15:38
@tetienne
Copy link
Contributor Author

tetienne commented Jun 8, 2019

@balloob Should be OK now

@balloob balloob merged commit 0a7919a into home-assistant:dev Jun 11, 2019
tetienne added a commit to tetienne/home-assistant.io that referenced this pull request Jun 12, 2019
frenck pushed a commit to home-assistant/home-assistant.io that referenced this pull request Jun 18, 2019
* CREATE documentation for new Somfy component

 - See home-assistant/core#19548

* UPDATE ha_release

* UPDATE ha_release to 0.95

* UPDATE ha_release to 0.95

* MERGE cover documentation within main one

* UPDATE No more notification, use Integrations

* ✏️ Tweak

* ✏️ Tweaks

* REMOVE qa scale
@balloob balloob mentioned this pull request Jun 26, 2019
@tetienne tetienne deleted the somfy-open-api branch July 17, 2019 11:43
alandtse pushed a commit to alandtse/home-assistant that referenced this pull request Oct 12, 2019
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants