Commit Graph

38 Commits (49478298ccfdc2dbaed74a19775cb790e49cf4b0)

Author SHA1 Message Date
RogerSelwyn 7c0d5526f3
Fix DarkSky spamming the log (#37421)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-07-03 15:49:45 -07:00
Paulus Schoutsen 1f71bdedab
Add temperature device class to Darksky sensors (#35544) 2020-05-12 10:37:04 -07:00
springstan ef9d9b17bd
Drop UNIT_ prefix for constants (#34164)
* Drop UNIT_ prefix for VOLT

* Drop UNIT_ prefix for DEGREE

* Drop UNIT_ prefix for CONDUCTIVITY

* Drop UNIT_ prefix for UV_INDEX

* Run isort
2020-04-21 19:45:53 +02:00
springstan 00b6409b76
Use LENGTH_METERS constant (#34110) 2020-04-12 21:44:56 +02:00
springstan b893150154
Add and use UNIT_DEGREE constant (#33978)
* Add and use UNIT_DEGREE constant

* Replace more occurrences

* Add and use TEMP_KELVIN

* Run isort
2020-04-11 16:54:11 +02:00
springstan 328cadbaa2
Use LENGTH_KILOMETERS constant (#33976)
* Use LENGTH_KILOMETERS constant

* Fix tests by importing the constant directly
2020-04-11 02:12:39 +02:00
springstan 25198242c1
Use TEMP_FAHRENHEIT constant (#33969) 2020-04-10 21:10:10 +02:00
springstan 78d87dc40f
Use TEMP_CELSIUS constant (#33963) 2020-04-10 19:17:46 +02:00
springstan 46bbe816f6
Remove None from dict.get(key, None) (#33794) 2020-04-07 21:06:05 +02:00
springstan c20a965eda
Improve string formatting v3 (#33667)
* Improve string formatting v3

* Address review comment
2020-04-05 01:32:58 +02:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
springstan f1a0ca7cd3
Add and use percentage constant (#32094)
* Add and use percentage constant

* Fix pylint error and broken test
2020-02-28 11:46:48 -08:00
Ville Skyttä 496bd3dddf
Add and use more unit constants (#32122)
* Add and use speed constants

* Add and use meter based volume and area constants

* Add and use more mass unit constants

* Add and use concentration unit constants

* Add and use watts per square meter constant

* Use more time constants

* Use more data constants
2020-02-24 17:52:14 -08:00
springstan a85808e325
Add and use time related constants (#32065)
* Add and use time related constants

* Sort time constants and reuse them in data rate constants

* Fix greeneyemonitor import

* Fix greeneyemonitor import V2

* Fix failing here_travel_time test

* Add TIME_MONTHS and TIME_YEARS

* Use TIME_MINUTES in opentherm_gw and isy994

* Add and use TIME_MILLISECONDS

* Change inconsistent ones

* Add TIME_MICROSECONDS and TIME_WEEKS

* Use constants in apcupsd and travisci

* Fix import error in upnp sensor.py

* Fix isy994 sensor.py using TIME_YEARS

* Fix dyson tests

* Use TIME_SECONDS in more places

* Use TIME_DAYS in google wifi
2020-02-23 22:09:24 +02:00
Franck Nijhof 345cc244ed
Correct names in manifests (C-L) (#30532) 2020-01-07 08:19:17 +01:00
Franck Nijhof a84741392b
Format all manifests with prettier (#30521) 2020-01-06 21:28:23 +01:00
Ville Skyttä fa4fa30461 Various string cleanups (#30435)
* Remove some unnecessary string concatenations

* Replace some simple str.formats with f-strings

* Replace some string concatenations with f-strings
2020-01-03 14:47:06 +01:00
Bas Nijholt f9e9a5e4cb Sort imports according to PEP8 for darksky (#29706) 2019-12-09 11:22:04 +01:00
Marius 0cdc315038 change icon for partly-cloudy-night (#29601)
to the available mdi:weather-night-partly-cloudy
2019-12-08 10:55:39 +05:30
Malte Franken 91c6cd9646 Move imports in darksky component (#27633)
* move imports to top-level

* modify patch path

* removed unused mocks and patches
2019-10-14 15:02:00 +02:00
Josh 71a3516053 Guard against network errors for Dark Sky (#27141)
* Guard against network errors for Dark Sky

- Prevents network errors from throwing an exception during
  state updates for the Dark Sky weather component.

* Implement `available` for Dark Sky component

* unknown -> unavailable
2019-10-04 19:28:55 -07:00
Franck Nijhof c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
MatthewFlamm 43bd116852 add utc tz to forecast (#27049) 2019-09-30 08:56:02 +02:00
Marius 50cec91cf0 Change darksky icon for clear night (#26452)
* change icon for clear night

change mdi:weather-sunny to mdi:night for condition clear night

* changed erroneous mdi:night to mdi:weather-night
2019-09-06 11:19:31 +02:00
Franck Nijhof 6a24d893c8 Use literal string interpolation in integrations B-D (f-strings) (#26378) 2019-09-03 17:09:59 +02:00
mbo18 6a02fd51b8 Fix missing DarkSky mdi icon (#26274)
* Fix missing DarkSky mdi icon

Fix mdi icon for DarkSky

* fix icon

* Update weather.py
2019-08-29 13:22:52 -07:00
Paulus Schoutsen 0ccffc3e55 Lint 2019-07-31 12:46:17 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Ryan Claussen de3d28d9d5 Add severe weather sensor to Dark Sky (#22701)
* Add severe weather alert sensor to Dark Sky

* fixup test case

* address review comments and fixup testcases

* address comments, fix assertion order

* remove extra line

* remove index increment
2019-07-16 18:03:05 +02:00
Tyler Page eae306c3f1 Fix iterating over NoneType exception (#23648)
* Fix iterating over NoneType exception

When self._dark_sky is None, don't try to return self._dark_sky.units

* Fix wrong check
2019-05-21 08:26:11 -04:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Eliran Turgeman 172ede217a Add 10 additional language options to DarkSky (#22719) 2019-04-04 14:23:31 +02:00
Rohan Kapoor afac09932f
Remove all config deprecations invalidated in 0.91 (#22704)
* Remove all config deprecations invalidated in 0.91

* Fix lint
2019-04-03 23:31:55 -07:00
Paulus Schoutsen cfe4cf30ad
Add manifests (#22699)
* Add manifests

* Update auto name

* Update codeowners

* Add requirements from platforms

* Minor cleanup

* Incorporate changes from awarecan PR
2019-04-03 21:14:45 -07:00
Tobias Sauerwein 048b100eea Clean up docstrings (#22679)
* Clean up docstrings

* Fix long lines

* Fix more docstrings

* Fix more docstrings

* Fix more docstrings
2019-04-03 17:40:03 +02:00
Ryan Claussen c3f090af17 Add hourly forecasts to Dark Sky (#21820) 2019-03-27 20:11:25 +00:00
MatthewFlamm ed93c3b2c1 Fix pressure in dark sky and openweathermap and add pressure utility (#21210) 2019-03-24 18:37:31 +01:00
Penny Wood f195ecca4b Consolidate all platforms that have tests (#22109)
* Moved climate components with tests into platform dirs.

* Updated tests from climate component.

* Moved binary_sensor components with tests into platform dirs.

* Updated tests from binary_sensor component.

* Moved calendar components with tests into platform dirs.

* Updated tests from calendar component.

* Moved camera components with tests into platform dirs.

* Updated tests from camera component.

* Moved cover components with tests into platform dirs.

* Updated tests from cover component.

* Moved device_tracker components with tests into platform dirs.

* Updated tests from device_tracker component.

* Moved fan components with tests into platform dirs.

* Updated tests from fan component.

* Moved geo_location components with tests into platform dirs.

* Updated tests from geo_location component.

* Moved image_processing components with tests into platform dirs.

* Updated tests from image_processing component.

* Moved light components with tests into platform dirs.

* Updated tests from light component.

* Moved lock components with tests into platform dirs.

* Moved media_player components with tests into platform dirs.

* Updated tests from media_player component.

* Moved scene components with tests into platform dirs.

* Moved sensor components with tests into platform dirs.

* Updated tests from sensor component.

* Moved switch components with tests into platform dirs.

* Updated tests from sensor component.

* Moved vacuum components with tests into platform dirs.

* Updated tests from vacuum component.

* Moved weather components with tests into platform dirs.

* Fixed __init__.py files

* Fixes for stuff moved as part of this branch.

* Fix stuff needed to merge with balloob's branch.

* Formatting issues.

* Missing __init__.py files.

* Fix-ups

* Fixup

* Regenerated requirements.

* Linting errors fixed.

* Fixed more broken tests.

* Missing init files.

* Fix broken tests.

* More broken tests

* There seems to be a thread race condition.
I suspect the logger stuff is running in another thread, which means waiting until the aio loop is done is missing the log messages.
Used sleep instead because that allows the logger thread to run. I think the api_streams sensor might not be thread safe.

* Disabled tests, will remove sensor in #22147

* Updated coverage and codeowners.
2019-03-18 23:07:39 -07:00