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

Fix loading flume integration #29926

Merged
merged 5 commits into from Dec 15, 2019
Merged

Conversation

@ChrisMandich
Copy link
Contributor

ChrisMandich commented Dec 13, 2019

Breaking Change:

Description:

Fixed error loading flume component #29853.

To resolve this, the PyPi package was updated to store the token file in the TMP directory rather than Python's CWD. Details found here: https://github.com/ChrisMandich/PyFlume

Pull request is to update the current package version to the v0.2.2 found here: https://pypi.org/project/PyFlume/0.2.2/

Related issue (if applicable):
fixes #29853

Pull request with documentation for home-assistant.io (if applicable):
home-assistant/home-assistant.io#10624

Example entry for configuration.yaml (if applicable):

sensor:
  # Flume
  - platform: flume
    username: YOUR_FLUME_USERNAME
    password: YOUR_FLUME_PASSWORD
    client_id: YOUR_FLUME_CLIENT_ID
    client_secret: YOUR_FLUME_CLIENT_SECRET

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.
  • I have followed the development checklist

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. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.
@project-bot project-bot bot added this to Needs review in Dev Dec 13, 2019
@project-bot project-bot bot moved this from Needs review to By Code Owner in Dev Dec 13, 2019
Dev automation moved this from By Code Owner to Cancelled Dec 14, 2019
@ChrisMandich ChrisMandich reopened this Dec 14, 2019
Dev automation moved this from Cancelled to Incoming Dec 14, 2019
@ChrisMandich ChrisMandich force-pushed the ChrisMandich:fix-flume branch from 77c7680 to 84516c8 Dec 14, 2019
@project-bot project-bot bot moved this from Incoming to Needs review in Dev Dec 14, 2019
@ChrisMandich ChrisMandich force-pushed the ChrisMandich:fix-flume branch from fc07e49 to c59ffbe Dec 14, 2019
@MartinHjelmare MartinHjelmare changed the title Fix https://github.com/home-assistant/home-assistant/issues/29853 Fix loading fume integration Dec 14, 2019
@home-assistant home-assistant deleted a comment from homeassistant Dec 14, 2019
@home-assistant home-assistant deleted a comment from homeassistant Dec 14, 2019
@MartinHjelmare

This comment has been minimized.

Copy link
Member

MartinHjelmare commented Dec 14, 2019

It's safer to ask Python for the temp directory, than hardcoding it.
https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir

An alternative would be to store the token in the home assistant config dir.

@ChrisMandich ChrisMandich changed the title Fix loading fume integration Fix loading flume integration Dec 14, 2019
@fabaff

This comment has been minimized.

Copy link
Member

fabaff commented Dec 14, 2019

An alternative would be to store the token in the home assistant config dir.

I second that.

@elupus

This comment has been minimized.

Copy link
Contributor

elupus commented Dec 14, 2019

It's even better to store token inside Hass. so just expose the data from the api.

Dev automation moved this from Needs review to Reviewer approved Dec 15, 2019
@MartinHjelmare MartinHjelmare merged commit 6dd496d into home-assistant:dev Dec 15, 2019
11 checks passed
11 checks passed
CI #20191214.41 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview CheckFormat) Overview CheckFormat succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
Details
cla-bot Everyone involved has signed the CLA
codecov/patch Coverage not affected when comparing 6f8f9c5...4154961
Details
codecov/project 94.48% (target 90%)
Details
Dev automation moved this from Reviewer approved to Done Dec 15, 2019
@MartinHjelmare MartinHjelmare added this to the 0.103.1 milestone Dec 15, 2019
@ChrisMandich ChrisMandich deleted the ChrisMandich:fix-flume branch Dec 15, 2019
@lock lock bot locked and limited conversation to collaborators Dec 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
6 participants
You can’t perform that action at this time.