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

Tibber: retry if we fail to connect at startup #12620

Merged
merged 6 commits into from Mar 1, 2018
Merged

Tibber: retry if we fail to connect at startup #12620

merged 6 commits into from Mar 1, 2018

Conversation

Danielhiversen
Copy link
Member

Description:

Tibber: retry if we fail to connect at startup

Example entry for configuration.yaml (if applicable):

sensor:
  - platform: tibber
    access_token: d1007ead2dc84a2b82f0de19451c5fb22112f7ae11d19bf2bedb224a003ff74a

Checklist:

  • The code change is tested and works locally.

Copy link
Member

@pvizeli pvizeli left a comment

Choose a reason for hiding this comment

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

Please use the core exception to handle this inside platform handler. So you need only raise the correct exception...

EDIT:
https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/exceptions.py#L31

@Danielhiversen
Copy link
Member Author

Thanks, had forgot about PlatformNotReady

@olskar
Copy link
Contributor

olskar commented Feb 26, 2018

Since 0.64, my tibber fails to load at startup and therefore is not shown at all. I guess this PR is to fix that or should i file a buq request @Danielhiversen ?

@Danielhiversen
Copy link
Member Author

No, this will not fix that.
Please check your log and open an issue.

yield from home.update_info()
dev.append(TibberSensor(home))
except (asyncio.TimeoutError, aiohttp.ClientError):
raise PlatformNotReady
Copy link
Member

Choose a reason for hiding this comment

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

raise PlatformNotReady()

Copy link
Member Author

Choose a reason for hiding this comment

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

Why?
No other components seems to do that?

@Danielhiversen
Copy link
Member Author

@pvizeli is this fine now?

@pvizeli pvizeli merged commit b186b27 into dev Mar 1, 2018
@pvizeli pvizeli deleted the tibber_030 branch March 1, 2018 22:15
@balloob balloob mentioned this pull request Mar 9, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants