Skip to content

Refactor netatmo to use hass.data#23429

Merged
MartinHjelmare merged 8 commits intohome-assistant:devfrom
cgtobi:netatmo_refactor
Apr 26, 2019
Merged

Refactor netatmo to use hass.data#23429
MartinHjelmare merged 8 commits intohome-assistant:devfrom
cgtobi:netatmo_refactor

Conversation

@cgtobi
Copy link
Copy Markdown
Contributor

@cgtobi cgtobi commented Apr 26, 2019

Description:

The replaces the global variable to be used to pass on the authentication etc. by storing it in hass.data as suggested by @MartinHjelmare.

Related issue (if applicable): hopefully fixes #23380

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

Example entry for configuration.yaml (if applicable):

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:

  • The manifest file has all fields filled out correctly (example).
  • New dependencies have been added to requirements in the manifest (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.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

Comment thread homeassistant/components/netatmo/__init__.py Outdated
Comment thread homeassistant/components/netatmo/__init__.py Outdated
Comment thread homeassistant/components/netatmo/__init__.py Outdated
Comment thread homeassistant/components/netatmo/__init__.py Outdated
Comment thread homeassistant/components/netatmo/__init__.py Outdated
Comment thread homeassistant/components/netatmo/sensor.py Outdated
Comment thread homeassistant/components/netatmo/sensor.py Outdated
Comment thread homeassistant/components/netatmo/sensor.py Outdated
Comment thread homeassistant/components/netatmo/sensor.py
Comment thread homeassistant/components/netatmo/__init__.py Outdated
Comment thread homeassistant/components/netatmo/__init__.py Outdated
Comment thread homeassistant/components/netatmo/__init__.py Outdated
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@MartinHjelmare MartinHjelmare added this to the 0.92.1 milestone Apr 26, 2019
@MartinHjelmare MartinHjelmare merged commit b84ba93 into home-assistant:dev Apr 26, 2019
pvizeli pushed a commit that referenced this pull request Apr 26, 2019
* Refactor NETATMO_AUTH to use hass.data

* Minor cleanup

* Rename conf to auth and other suggestions by Martin

* Revert webhook name change

* Rename constant

* Move auth

* Don't use hass.data.get()

* Fix auth string
@pvizeli pvizeli mentioned this pull request Apr 26, 2019
@cgtobi cgtobi deleted the netatmo_refactor branch August 25, 2020 05:55
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.

Netatmo integration does not work in 0.92 (Raspbian)

4 participants