Skip to content

Add option to set language of openweathermap sensor, and handle updating errors#8046

Merged
fabaff merged 2 commits into
home-assistant:devfrom
azogue:openweathermap
Jun 17, 2017
Merged

Add option to set language of openweathermap sensor, and handle updating errors#8046
fabaff merged 2 commits into
home-assistant:devfrom
azogue:openweathermap

Conversation

@azogue
Copy link
Copy Markdown
Member

@azogue azogue commented Jun 15, 2017

Description:

Add new config option language to set the language code (two-characters string) in which you want text results to be returned by the PyOWM library.

Also, handle KeyErrors occurring in the library when trying to parse None strings.

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2819

Example entry for configuration.yaml (if applicable):

sensor:
  - platform: openweathermap
    name: Local Weather
    api_key: !secret openweathermap_api_key
    forecast: 1
    language: es
    monitored_conditions:
      - weather
      - temperature
      - wind_speed
      - humidity
      - pressure
      - clouds
      - rain
    scan_interval: 180

Checklist:

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

Copy link
Copy Markdown
Member

@fabaff fabaff left a comment

Choose a reason for hiding this comment

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

Looks good to me 🐦

@fabaff fabaff merged commit 18f81d7 into home-assistant:dev Jun 17, 2017
@azogue azogue deleted the openweathermap branch June 22, 2017 09:41
@balloob balloob mentioned this pull request Jul 1, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Oct 20, 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.

4 participants