Commit Graph

57 Commits (f4ef8fd1bc95ced0352ef22486e16fcc477306bb)

Author SHA1 Message Date
Diogo Gomes aec425d1f6 Weather Platform - IPMA (#14716)
* initial commit

* lint

* update with pyipma

* Added test

* Added test

* lint

* missing dep

* address comments

* lint

* make sure list is iterable

* don't bother with list

* mock dependency

* no need to add test requirements

* last correction
2018-06-03 23:01:48 +02:00
Nick Whyte e12994a0cd Fix BOM weather '-' value (#14042) 2018-05-08 13:35:55 -04:00
mvn23 6e0a3abf66 Fix TypeError on round(self.humidity) (fixes #13116) (#14174)
* Fix TypeError on round(self.humidity)

Some weather platforms postpone the first data fetch for a while on init. As a result round(self.humidity is called before it is assigned a value, producing an error. This is a fix for that.

* Rewrite to avoid false negative evaluation

As per the suggestion from @OttoWinter, rewrite to avoid matching e.g. 0.0 as false.
2018-04-30 13:27:45 -04:00
escoand 8e7f500f28 Add precipitation to OpenWeatherMap forecast (#13971)
* add initial precipitation support

* move attr to component

* remove blank line

* add forecast attributes to platform and update demo

* add tests

* break long lines

* calc lower temp correctly

* move all new attributes to component

* convert temp low only when existing
2018-04-29 17:50:49 +02:00
c727 a94864c86f Modify weather components for "new" frontend card (#14076)
* Enable weather condition for all forecasts (OWM)

* Remove entity_picture from BR

* Remove summary texts from Dark Sky

* Update test_darksky.py
2018-04-25 12:37:57 +02:00
Pascal Vizeli c018071218
Revert "Update yweather.py" (#13900)
* Revert "Add unique_id for BMW ConnectedDrive (#13888)"

This reverts commit 9014e26845.

* Revert "Added snips service descriptions (#13883)"

This reverts commit 1c4da0c4a6.

* Revert "Fix race condition for component loaded before listening (#13887)"

This reverts commit bba997e484.

* Revert "Missing property decorator added (#13889)"

This reverts commit bf98b793c5.

* Revert "Update frontend to 20180414.0"

This reverts commit 1617fbea4c.

* Revert "Further untangle data entry flow (#13855)"

This reverts commit 4d44c0feff.

* Revert "add support for Kodi discovery (#13790)"

This reverts commit 5a5dad689b.

* Revert "Update yweather.py (#13851)"

This reverts commit c3388d63a1.
2018-04-15 09:50:44 +02:00
TheCellMC c3388d63a1 Update yweather.py (#13851)
* Update yweather.py

* Update yweather.py

* Update yweather.py

* Update yweather.py
2018-04-14 10:32:44 +02:00
Wojtek 191e32f6cf Update yweather.py (#13802)
Map clear-night string to 31 value.
2018-04-10 21:11:45 +02:00
cgtobi 181eca4b45 Upgrade python-forecastio to 1.4.0 (#13282)
* Upgrade python-forecastio to 1.4.0

* Upgrade python-forecastio to 1.4.0 for sensor as well.
2018-03-17 17:43:07 +01:00
Paulus Schoutsen 7d8ca2010b Merge remote-tracking branch 'origin/master' into dev 2018-02-28 23:00:44 -08:00
Philip Rosenberg-Watt e82b358831 Round humidity for display purposes (#12766)
Humidity was not being rounded as temperature was. This change fixes
that.
2018-02-28 10:59:47 -08:00
Philip Rosenberg-Watt 992516ba86 Fix DarkSky floating-point math (#12753)
DarkSky delivers relative humidity from 0-100% as a 0-1 decimal value,
so we convert it by multiplying by 100.0. Unfortunately, due to floating
point math, the display of a raw value of 0.29 ends up looking like
28.999999999999996% relative humidity.

This change rounds the value to two decimal places.
2018-02-27 11:22:16 -08:00
Philip Rosenberg-Watt 4e522448b1 Fix DarkSky floating-point math (#12753)
DarkSky delivers relative humidity from 0-100% as a 0-1 decimal value,
so we convert it by multiplying by 100.0. Unfortunately, due to floating
point math, the display of a raw value of 0.29 ends up looking like
28.999999999999996% relative humidity.

This change rounds the value to two decimal places.
2018-02-27 11:19:02 -08:00
mjj4791 6299c054c8 Prevent error when no internet or DNS is available (#12486) 2018-02-17 16:19:27 -08:00
Paulus Schoutsen 3fd61d8f45 Update voluputous (#12463)
* Update voluputous

* Fix http config

* Fix optional with default=None

* Optional, default=none

* Fix defaults in voluptuous schemas

* Fix tests

* Fix update error

* Lint
2018-02-17 10:29:14 +01:00
Otto Winter 678f284015 Upgrade pylint to 1.8.2 (#12274)
* Upgrade pylint to 1.8.1

* Fix no-else-return

* Fix bad-whitespace

* Fix too-many-nested-blocks

* Fix raising-format-tuple

See https://github.com/PyCQA/pylint/blob/master/doc/whatsnew/1.8.rst

* Fix len-as-condition

* Fix logging-not-lazy

Not sure about that TEMP_CELSIUS though, but internally it's probably just like if you concatenated any other (variable) string

* Fix stop-iteration-return

* Fix useless-super-delegation

* Fix trailing-comma-tuple

Both of these seem to simply be bugs:
 * Nest: The value of self._humidity never seems to be used anywhere
 * Dovado: The called API method seems to expect a "normal" number

* Fix redefined-argument-from-local

* Fix consider-using-enumerate

* Fix wrong-import-order

* Fix arguments-differ

* Fix missed no-else-return

* Fix no-member and related

* Fix signatures-differ

* Revert "Upgrade pylint to 1.8.1"

This reverts commit af78aa00f125a7d34add97b9d50c14db48412211.

* Fix arguments-differ

* except for device_tracker

* Cleanup

* Fix test using positional argument

* Fix line too long

I forgot to run flake8 - shame on me... 🙃

* Fix bad-option-value for 1.6.5

* Fix arguments-differ for device_tracker

* Upgrade pylint to 1.8.2

* 👕 Fix missed no-member
2018-02-11 09:20:28 -08:00
escoand e9508405bc Add conditions to forecast (#12074)
* add conditions to forecast chart

* Fix pylint issues
2018-01-31 13:05:15 +01:00
escoand 4cb1f93019 fixed timestamp problem in firefox (#12073) 2018-01-31 11:26:35 +01:00
Otto Winter 8dcfd35b8b Spelling fixes (#12041)
* Spelling fixes

*Lots* of them.

* Spelling breaking changes

* Fix lint errors
2018-01-29 23:37:19 +01:00
Fabian Affolter 47e31dc9ee Fixes for PEP257 (#11810)
* Fixes for PEP257

* More updates
2018-01-20 22:35:38 -08:00
cgtobi ed66c21035 Cast return values and add unit tests for the yahoo weather component. (#10699)
* Add unittest for yahoo weather component.

* Add requitements for tests.

* Update requirements.

* Revert "Update requirements."

This reverts commit 024b5cf8bf.

* Update requirements.

* Randomize sample data.

* Remove unnecessary methods.

* Remove dependency and replace with MockDependency.

* Add temporary fix for yahoo weather API issue.
2018-01-11 15:42:51 -08:00
Paulus Schoutsen 88b70e964c
Remove execution file perm (#11563) 2018-01-09 23:55:14 -08:00
Dan Nixon c53fc94e84 Address missed review comments for Dark Sky weather (#11520)
See #11435
2018-01-07 19:54:27 -08:00
Dan Nixon 3cbd77f6ac Add Dark Sky weather component (#11435) 2018-01-07 13:59:32 -08:00
Fabian Affolter c613585100
Add missing configuration variables (#11390)
* Add missing configuration variables

* Minor changes

* Sync platforms and other minor updates
2018-01-06 21:53:14 +01:00
Fabian Affolter d7e52d8014
Upgrade pyowm to 2.8.0 (#11332) 2017-12-29 10:06:52 +01:00
Fabian Affolter e92e433805 Upgrade yahooweather to 0.10 (#11309) 2017-12-27 09:19:46 +01:00
PhracturedBlue 8947052405 Fix issues from review of ecobee weather component (#10903)
* Fix issues from review

* Don't use STATE_UNKNOWN
2017-12-02 22:44:55 +01:00
PhracturedBlue 606fa34792 Create ecobee weather platform (#10869)
* Create ecobee weather component

* Update requirements_all for ecobee

* Fix missed lint issue
2017-12-01 12:30:45 +01:00
Lukas Barth 086f64b06c Fix yweather (#10661) 2017-11-18 14:33:18 -08:00
On Freund c7b0f25eae Fix Yahoo Weather icons over SSL (#10602) 2017-11-15 22:27:26 +02:00
Fabian Affolter d25f676711 Move temperature display helper from components to helpers (#10555) 2017-11-14 10:36:18 +01:00
Eugenio Panadero ac256d5943 handle OWM API error calls (#9865) 2017-10-15 10:31:34 +02:00
mjj4791 e7ce110dc6 Buienradar newconditions (#8897)
* new monitored conditions and support for new weathercard

* new monitored conditions and support for new weathercard

* minor changes
2017-08-15 23:07:04 -07:00
Fabian Affolter b655fe6e04 Allow to set coordinates (#8858) 2017-08-06 15:20:51 +02:00
Boyi C 77cdc833f0 Update yweather.py (#8820)
Fix missing weather unit support.
Move some weather code to their correct classes.
2017-08-04 17:22:38 +02:00
mjj4791 775185896a buienradar dates tz-aware (#8767) 2017-07-31 20:37:33 -07:00
Boyi C abcfcdd887 Yahoo Weather update, supports forecast for more days (#8626)
* work on weather panel

* update yahooweather with more forecast details

* Update yweather to allow user input forecast date

* fix for houndci

* fix long line

* fix1

* Revert "work on weather panel"

This reverts commit 28b4972233.

revert unintentional submodule change

* fix2

fix typo, add try catch to another int()

* fix pylint

* fix3

* fix4

* Update yweather.py

* Update yweather.py

* Remove global data construct

* Yahoo API support only 5 days forecast

* remove forecast

* fix lint

* fix lint p2

* Update yweather.py
2017-07-26 16:46:21 +02:00
mjj4791 5e71e9b826 buienradar==0.7, fix winddirection/azimuth, logging (#8281)
* buienradar==0.7, fix winddirection/azimuth, logging

* prevent multiple update cycles

* prevent multiple update cycles

* prevent multiple sensor updates for precipitation forecast

* prevent multiple sensor updates for precipitation forecast

* Update comments

* Adapted logging

* Adapted logging
2017-07-06 21:39:28 -07:00
Paulus Schoutsen 5779d64e98 Fix some issues for PyLint 1.7.2 (#8356)
* Fix some issues for PyLint 1.7.2

* More fixes

* Revert position change for cover
2017-07-05 20:02:16 -07:00
Fabian Affolter 0981956caa Upgrade pyowm to 2.7.1 (#8274) 2017-07-01 12:53:29 +02:00
Bas Schipper 6234f2d73f Added buienradar precipitation forecast average & total sensors (#8171)
* Added precipitation forecast average & total sensors

* Fixed some code style issues

* Fixed some code style issues

* Minor fix default timeframe

* Update buienradar.py

* Update buienradar.py
2017-06-24 00:12:52 -07:00
Fabian Affolter d38acfbd39 Add Yahoo! weather platform (#7939) 2017-06-07 10:49:54 +02:00
mjj4791 549133a062 Added buienradar sensor and weather (#7592)
* Added buienradar sensor and weather

* used external library for parsing

* used external library for parsing

* updated buienradar lib to 0.4

* Make sure you import 3rd party libraries inside methods.

* Make sure you import 3rd party libraries inside methods.

* clean up code; optimized

* imports, sensor name and attributes

* updated requirements to match imports

* use asyncio for http get
2017-06-04 23:48:11 -07:00
Fabian Affolter a4f1f6e724 Update docstrings (#7374)
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstring

* Update docstrings

* Update docstrings

* Fix lint issues

* Update docstrings

* Revert changes in dict
2017-05-02 09:18:47 -07:00
Jacob Tomlinson 2d6b09586d Added Met Office weather and sensor components (#6742)
* Added Met Office weather and sensor components

* Removed unnecessary dependancy

* Generated requirements

* Fix time interval

* Updated coverage

* Some review changes

* Allow user to specify lat and lon in component

* Added missing import

* Fixed unit

* Fixed import indent

* Updated condition to use CONDITION_CLASSES
2017-03-31 22:03:27 +02:00
Zac Hatfield Dodds 8ca897da57 Zamg weather (#5894)
* Fast & efficient updates for ZAMG weather data

ZAMG updates on the hour, so instead of checking every half-hour we can
check each minute - only after the observations are taken until
receiving them.

* sensor.zamg: test instead of whitelist for station_id

* Autodetect closest ZAMG station if not given

* ZAMG weather component, based on the sensor

* Review improvements

* Update to new ZAMG schema, add logging

Turns out it wasn't a typo, but rather an upstream schema change.  Added
better error handling to ease diagnosis in case it happens again.

* No hardcoded name
2017-02-24 22:45:46 +01:00
Tom Matheussen 66d8787d47 Weather platform Forecast (#4721)
* Added forecast functionality to the weather platform, updated OWM to get forecast data

* style fixes

* Changed returned forecast data to a more managable dict

* Fixed line length

* forecast will always be collected, data returned from owm is based on metric setting

* use list comprehension to create the forecast data

* Added forecast data to the weather demo

* Create dict directly in list comprehension

* Minor variable change in weather demo platform

* Convert forecast temperatures in weather component

* set forecast attributes as constants

* Style fixes and tests

* Copied forecast_entry instead of mutating data
2017-02-19 16:42:12 -08:00
Fabian Affolter 6786f83c26 Upgrade pyowm to 2.6.1 (#5729) 2017-02-03 09:43:29 +01:00
Zac Hatfield Dodds e00e6f9db6 Bom weather platform (#5153)
* Fix typo

* Auto-config for `sensor.bom`

Deprecate (but still support) the old two-part station ID, and move to a
single `station` identifier.  Any combination of these, including none,
is valid; most results in downloading and caching the station map to
work out any missing info.

* Add `weather.bom` platform

Very similar to `sensor.bom`, but supporting the lovely new `weather`
component interface.  Easier to configure, and does not support the
deprecated config options.

* Review improvements to BOM weather

Largely around better input validation.
2017-01-15 12:12:50 +01:00