Giter VIP home page Giter VIP logo

nws's People

Contributors

matthewflamm avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

nws's Issues

Missing LENGTH_KILOMETERS here!

nws/weather.py

Line 18 in 1fb487f

LENGTH_METERS, LENGTH_MILES, PRESSURE_PA, PRESSURE_INHG, TEMP_CELSIUS,

This line needs something like:

diff --git a/weather.py b/weather.py
index 164af02..a374f7f 100644
--- a/weather.py
+++ b/weather.py
@@ -15,7 +15,7 @@ from homeassistant.components.weather import (
     ATTR_FORECAST_WIND_SPEED, ATTR_FORECAST_WIND_BEARING)
 from homeassistant.const import (
     CONF_API_KEY, CONF_NAME, CONF_LATITUDE, CONF_LONGITUDE, CONF_MODE,
-    LENGTH_METERS, LENGTH_MILES, PRESSURE_PA, PRESSURE_INHG, TEMP_CELSIUS,
+    LENGTH_KILOMETERS, LENGTH_METERS, LENGTH_MILES, PRESSURE_PA, PRESSURE_INHG, TEMP_CELSIUS,
     TEMP_FAHRENHEIT)
 from homeassistant.helpers.aiohttp_client import async_get_clientsession
 from homeassistant.helpers import config_validation as cv

Error on device update! on Home Assistant 0.95.2

Installed on Hass.io under custom_components/nws

Integrated in config.yaml as:

weather:
  - platform: nws
    api_key: !secret emailaddress

Logs show:

nws: Error on device update!

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 375, in async_device_update
    await self.async_update()
  File "/config/custom_components/nws/weather.py", line 187, in async_update
    self._metar_obs = self._metar(self._observation['rawMessage'])
  File "/usr/local/lib/python3.7/site-packages/metar/Metar.py", line 369, in __init__
    code = self.code+" "    # (the regexps all expect trailing spaces...)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.