Skip to content

Prevent error when no forecast data was available#9176

Merged
pvizeli merged 3 commits into
home-assistant:devfrom
mjj4791:patch-1
Aug 29, 2017
Merged

Prevent error when no forecast data was available#9176
pvizeli merged 3 commits into
home-assistant:devfrom
mjj4791:patch-1

Conversation

@mjj4791
Copy link
Copy Markdown
Contributor

@mjj4791 mjj4791 commented Aug 27, 2017

Prevent an Error when buienradar data was available, but no forecasted data was retrieved for the requested day.

No docu change
No changes in configuration

Prevent an Error when buienradar data was available, but no forecasted data was retrieved for the requested day.
@mention-bot
Copy link
Copy Markdown

@mjj4791, thanks for your PR! By analyzing the history of the files in this pull request, we identified @basschipper, @lrmate and @balloob to be potential reviewers.

try:
new_state = data.get(FORECAST)[fcday].get(self.type[:-3])
except IndexError:
_LOGGER.debug("Data contained no forecast for fcday=%s...", fcday)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

line too long (86 > 79 characters)

except IndexError:
_LOGGER.debug("Data contained no forecast for fcday=%s...", fcday)
return False

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blank line contains whitespace

try:
condition = data.get(FORECAST)[fcday].get(CONDITION)
except IndexError:
_LOGGER.debug("Data contained no forecast for fcday=%s...", fcday)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

line too long (86 > 79 characters)

@pvizeli pvizeli merged commit 5d800c1 into home-assistant:dev Aug 29, 2017
matemaciek added a commit to matemaciek/home-assistant that referenced this pull request Aug 30, 2017
* upstream/dev: (113 commits)
  Fix fitbit error when trying to access token after upgrade. (home-assistant#9183)
  Upgrade sendgrid to 5.0.1 (home-assistant#9215)
  Upgrade pyasn1 to 0.3.3 and pyasn1-modules to 0.1.1 (home-assistant#9216)
  directv: extended discovery via REST api, bug fix  (home-assistant#8800)
  Bayesian Binary Sensor (home-assistant#8810)
  Add cloud auth support (home-assistant#9208)
  Abode push events and lock, cover, and switch components (home-assistant#9095)
  Lint Sonarr tests
  Upgrade pymysensors to 0.11.1 (home-assistant#9212)
  Refactor rfxtrx (home-assistant#9117)
  Issue home-assistant#6893 in rfxtrx (home-assistant#9130)
  Support for season sensor (home-assistant#8958)
  Add counter component (home-assistant#9146)
  Fix and optimize digitalloggers platform (home-assistant#9203)
  Prevent error when no forecast data was available (home-assistant#9176)
  Add "status" to Sonarr sensor (home-assistant#9204)
  fix worldtidesinfo home-assistant#9184 (home-assistant#9201)
  Update pushbullet.py (home-assistant#9200)
  Fix dht22 when no data was read initially home-assistant#8976 (home-assistant#9198)
  Prevent iCloud exceptions in logfile (home-assistant#9179)
  ...
@balloob balloob mentioned this pull request Sep 7, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Dec 11, 2017
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.

6 participants