matthewflamm / nws Goto Github PK
View Code? Open in Web Editor NEWHome assistant custom weather platform for NWS
Home assistant custom weather platform for NWS
Line 18 in 1fb487f
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
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'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.