epenet
9c3b40dad1
Deprecate conversion utilities ( #78957 )
...
* Deprecate utilities
* Deprecate distance and speed
* Add tests
* Adjust pylint
* Simplify temperature deprecation
2022-09-28 19:39:44 +02:00
epenet
5438552d4a
Cleanup unit conversion ( #79197 )
...
* Move UNIT_RATIO to BaseUnitConverter
* Make UNIT_CONVERSION private
* Remove STATISTIC_UNIT_TO_UNIT_CLASS constant
* Cleanup websocket_api
* Imrpove valid_units check
2022-09-28 13:49:46 +02:00
epenet
5389ff3253
Add new weight device class ( #79185 )
2022-09-28 12:13:49 +02:00
epenet
c96c5bed7d
Remove argument validation in Unit Converter ( #79107 )
...
* Remove argument validation in Unit Converter
* Use HomeAssistantError
* Adjust tests
* Improve coverage
2022-09-28 10:58:04 +02:00
epenet
62022a2657
Increase code coverage for migrated utilities ( #78990 )
...
Increase code coverage for migrated utilites
2022-09-23 17:32:59 +02:00
epenet
4200778eaf
Move distance and speed util to unit_conversion ( #78967 )
2022-09-23 08:23:59 -04:00
epenet
ddf56baf7a
Move temperature utility to unit_conversion ( #78960 )
2022-09-22 18:31:50 +02:00
epenet
c8491c4404
Move volume utility to unit_conversion ( #78955 )
...
* Move volume utility to unit_conversion
* Split tests
2022-09-22 17:49:45 +02:00
epenet
523d8d246b
Move pressure utility to unit_conversion ( #78953 )
2022-09-22 16:44:09 +02:00
epenet
0767cdd935
Move energy and power utilites to unit_conversion ( #78950 )
...
* Move energy and power utilites to unit_conversion
* Move tests
2022-09-22 15:39:49 +02:00
epenet
ca78b1a77d
Add new energy utility ( #78883 )
...
* Add new energy utility
* Adjust STATISTIC_UNIT_TO_VALID_UNITS
2022-09-21 19:40:40 +02:00
epenet
d7382aadfe
Add new power utility ( #78867 )
...
* Add power utility
* Fix tests
2022-09-21 14:48:38 +02:00
Artem Draft
29be6d17b0
Add is_host_valid util ( #76589 )
2022-09-11 11:12:04 -05:00
epenet
9490771a87
Refactor distance, speed and volume utils ( #77952 )
...
* Refactor distance util
* Fix bmw connected drive tests
* Adjust here travel time tests
* Adjust waze travel time tests
* Adjust test_distance
* Adjust rounding values
* Adjust more tests
* Adjust volume conversions
* Add tests
2022-09-07 16:18:00 +02:00
Paulus Schoutsen
481205535c
Add PrusaLink integration ( #77429 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-08-29 20:45:27 -04:00
J. Nick Koston
48e82ff62f
Fix failure to raise on bad YAML syntax from include files ( #75510 )
...
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-07-20 19:25:17 +02:00
Franck Nijhof
7adb0f0ef5
Custom component -> Custom integration ( #75404 )
2022-07-18 22:10:22 +02:00
J. Nick Koston
9a27f1437d
Use default encoder when saving storage ( #75319 )
2022-07-17 14:25:19 +02:00
henryptung
7d27dad190
Remove pip --prefix workaround ( #74922 )
...
Remove --prefix workaround
See discussion in https://github.com/home-assistant/core/issues/74405 .
This workaround is no longer needed on pip >= 21.0 and actively causes problems for pip >= 21.3.
2022-07-11 11:33:28 +02:00
J. Nick Koston
8d0e54d776
Use the orjson equivalent default encoder when save_json is passed the default encoder ( #74377 )
2022-07-04 08:41:23 -05:00
Erik Montnemery
d3f4108a91
Support knots and ft/s in weather wind speed ( #74175 )
2022-06-29 16:34:41 +02:00
Erik Montnemery
c186a73e57
Tweak speed util ( #74160 )
2022-06-29 12:01:09 +02:00
[pʲɵs]
91a119917d
List more private and link-local IP networks ( #74064 )
...
List more private and link-local IP networks
The IPv6 link-local network is especially important as without it
local accounts don't work on IPv6-capable networks with no IPv6 DHCP
server.
2022-06-27 22:00:44 -07:00
J. Nick Koston
1866a1e925
Handle non-str keys when storing json data ( #73958 )
2022-06-24 09:59:01 -05:00
J. Nick Koston
fd9fdc6283
Fix error reporting with unserializable json ( #73908 )
2022-06-23 20:32:45 +02:00
J. Nick Koston
034c0c0593
Improve YAML Dump times with C Dumper ( #73424 )
2022-06-13 13:14:30 -07:00
J. Nick Koston
dca4d3cd61
Significantly improve yaml load times when the C loader is available ( #73337 )
2022-06-13 08:44:46 -10:00
Kevin Stillhammer
90e5d69184
Add template as_timedelta ( #71801 )
2022-05-23 19:32:22 +02:00
J. Nick Koston
4e9bc9eaff
Small cleanups to find_next_time_expression and addition of tests ( #71845 )
2022-05-14 12:13:32 -07:00
J. Nick Koston
ebce5660e3
Sync event timed_fired and the context ulid time ( #71854 )
2022-05-14 12:12:08 -07:00
J. Nick Koston
2a9f043039
Use ULID short format for context ids ( #71119 )
2022-05-01 21:44:54 -07:00
J. Nick Koston
d03760d0bb
Switch to using ULIDs for context_ids ( #70246 )
2022-04-18 22:45:41 -07:00
Marc Mueller
c9cc2eb7c8
Fix flaky datetime test ( #68524 )
2022-03-23 09:30:01 +01:00
Paulus Schoutsen
929df2bc29
Improve error handling process_play_media_url ( #68322 )
2022-03-20 20:25:15 -07:00
Joakim Sørensen
9a6f5bbc04
Update whoami URL ( #67793 )
2022-03-07 11:11:25 +01:00
J. Nick Koston
ffcac67d99
Add is_ipv4_address and is_ipv6_address utils ( #66472 )
2022-02-13 15:23:11 -06:00
Tobias Sauerwein
8b38fa58aa
Bump pytest to 7.0.0 ( #65981 )
2022-02-08 10:03:27 +01:00
J. Nick Koston
676edb610f
Add coverage for color_rgbww_to_rgb, fix divzero case ( #65721 )
2022-02-05 10:59:32 -06:00
Franck Nijhof
fa09cf663e
Update black to 22.1.0 ( #65788 )
2022-02-05 14:19:37 +01:00
Paulus Schoutsen
5da923c341
Protect state.as_dict from mutation ( #65693 )
2022-02-04 14:45:25 -08:00
J. Nick Koston
26ff6d2aa0
Fix warm/cold reversal in rgbww_to_color_temperature ( #65677 )
2022-02-04 11:36:30 -08:00
Erik Montnemery
63680f0b36
Make util.async_.protect_loop name names ( #65493 )
2022-02-03 14:06:40 +01:00
Erik Montnemery
5a34feb7de
Don't warn on time.sleep injected by the debugger ( #65420 )
2022-02-02 08:58:14 -08:00
Erik Montnemery
2caad1a474
Add support for converting to and from mmHg ( #64844 )
2022-01-24 22:57:56 +01:00
Erik Montnemery
7c110eeef4
Remove Windows workarounds from tests/utils/test_json.py ( #64311 )
2022-01-17 19:34:46 +01:00
Matthias Alphart
dc58bc375a
Warn on`time.sleep` in event loop ( #63766 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-11 17:55:24 +01:00
Franck Nijhof
20bdcc7fff
Replace hass.helpers: async_get_clientsession() ( #63910 )
2022-01-11 17:33:50 +01:00
Paulus Schoutsen
1ea3a17d89
Allow sending webhooks via WS connection ( #62725 )
2022-01-07 10:41:36 -08:00
J. Nick Koston
d325de7510
Add additional guarding to color_rgb_to_rgbww ( #62220 )
2021-12-19 09:44:53 -06:00
J. Nick Koston
94ae6ac2b2
Handle color temp to RGBWW conversion ( #61473 )
...
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-12-16 05:39:33 -06:00
J. Nick Koston
3eabd69666
Fix exception in color_rgb_to_rgbww ( #61466 )
2021-12-10 22:19:54 -08:00
Marvin Wichmann
707fe67c00
Move StrEnum to homeassistant.backports and move Platform to homeassistant.const ( #60880 )
...
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-12-03 09:31:17 +01:00
Erik Montnemery
9f4a99fe81
Revert "Add bytes support for bitwise template operations" ( #60854 )
2021-12-03 08:50:29 +01:00
Franck Nijhof
3c66706a49
Clean up deprecated sanitize_filename and sanitize_path ( #60859 )
2021-12-02 15:35:11 -05:00
Erik Montnemery
88068fa97f
Remove unused OrderedEnum ( #60392 )
2021-11-26 11:10:39 +01:00
Jan Bouwhuis
d33457b7bc
Add bytes support for bitwise template operations ( #60211 )
...
* Add bytes support for bitwise template operations
* spelling
* Update bitwise tests
* remove try block for bytes conversion
* do not accept empty `bytes` object
2021-11-24 15:15:27 +01:00
Ville Skyttä
053c456199
Change device entry type to an StrEnum ( #59940 )
...
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-11-22 18:14:15 +01:00
rianadon
ecf00a1eae
Add accumulated precipitation to unit system ( #59657 )
...
* Add accumulated precipitation to unit system
* Fix template test
* Fix typo of testing pressure instead of precipitation
* Add extra arguments so unit system test passes
2021-11-19 09:18:44 +01:00
rianadon
7cc7bbb76d
Add speed to units system ( #58437 )
...
* Use speed units in unit system
* Use more obvious conversion factor for unit system speed test
* Use wind_speed instead of speed, use m/s
2021-11-18 16:08:42 +01:00
Erik Montnemery
fa952364cc
Remove test_check_package_version_does_not_match ( #59785 )
2021-11-16 07:54:08 -08:00
J. Nick Koston
96f7b0d910
Use atomicwrites for mission critical core files ( #59606 )
2021-11-15 11:19:31 +01:00
Matthias Alphart
f8f060b72b
Make util.color._match_max_scale public ( #59207 )
2021-11-10 22:29:16 -08:00
J. Nick Koston
ebb25ab0e6
Make yaml file writes safer ( #59384 )
2021-11-10 22:19:56 -08:00
Tim Rightnour
93395f9b68
Add support for PRESSURE_CBAR (centibars) ( #58762 )
...
* Add support for PRESSURE_CBAR (centibars). This is the standard UOM for tensiometers.
While the data could be converted into something like MBAR, and displayed
like that, the correct UOM for this type of sensor is CBAR. Displaying
it as MBAR would be the same as displaying air pressure as feet of Hg, while
technically correct, it's hard to understand when reading.
Adding support for this UOM will fix errors in the UI(statistics) about the unit not
matching a unit of the device_class.
* Add tests for PRESSURE_CBAR
2021-11-10 09:44:05 +01:00
rianadon
a102c425a9
Add speed conversion function & add speed to units system ( #53846 )
...
* Add speed conversion function
* Add test for speed utility functions
* Update unit system tests
* Fix incorrect unit conversions in tests
* Fix some test errors
* Calculate speed units from smaller set of constants
* Fix typo in speed test
* Use pytest.approx for checking floating point values
* Change other instance of speeds needing to be pytest.approx
* Revert changes to unit system
* Fix oopsie in defining in/day and in/hr
* Parametrize test
* Add comments describing calculations & remove duplicate test
2021-11-09 08:12:28 +01:00
Otto Winter
a9c0f89c09
Fix find_next_time_expression_time ( #58894 )
...
* Better tests
* Fix find_next_time_expression_time
* Add tests for Nov 7th 2021, Chicago transtion
* Update event tests
* Update test_event.py
* small performance improvement
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-11-01 17:45:13 +01:00
Glenn Waters
e4f15c42e0
Add kPa as a pressure unit ( #56885 )
2021-10-01 08:08:04 -07:00
Paulus Schoutsen
19c54b8cbf
Drop unused ruamel ( #55672 )
2021-09-03 22:17:10 -07:00
Bram Kragten
e23750b2a4
Add device class `gas` and enable statistics for it ( #54110 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-08-11 09:58:19 -07:00
Marc Mueller
553521a76b
Add mixin classes for required keys in EntityDescription ( #53610 )
2021-07-28 11:50:13 +02:00
Joakim Sørensen
85c1614204
Add currency to location data ( #53575 )
2021-07-27 21:05:16 -07:00
Ville Skyttä
470f2dd73f
Upgrade pyupgrade to 2.21.2, apply its changes ( #52987 )
2021-07-19 10:46:09 +02:00
J. Nick Koston
1ba5c1c9fb
Fix deadlock at shutdown with python 3.9 ( #52613 )
2021-07-07 09:23:24 +02:00
Erik Montnemery
0476c7f9ee
Normalize temperature statistics to °C ( #52297 )
...
* Normalize temperature statistics to °C
* Fix tests
* Support temperature conversion to and from K, improve tests
* Fix test
* Add tests, pylint
2021-06-30 14:17:58 +02:00
Joakim Sørensen
7ff14b47a8
Use whoami for location lookup ( #50934 )
2021-05-22 20:34:48 -07:00
J. Nick Koston
bf2d40adfe
Migrate from pytz to python-dateutil ( #49643 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-05-07 22:46:26 -07:00
Marc Mueller
f1d48ddfe3
Update pylint to 2.8.0 ( #49637 )
2021-04-24 14:39:24 -10:00
J. Nick Koston
04a0ca14e0
Ensure shutdown does not deadlock ( #49282 )
2021-04-18 08:55:51 -10:00
J. Nick Koston
d71f913a12
Ensure original log handlers are restored at close ( #49230 )
...
Error messages after close were not being logged
2021-04-15 10:53:48 +02:00
Paulus Schoutsen
051531d9c1
Clean up mobile app ( #48607 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-01 16:22:08 -07:00
J. Nick Koston
f91de1c8b9
Add support for capturing renewals to dhcp discovery ( #48242 )
2021-03-30 15:41:12 +02:00
Franck Nijhof
ad13a9295e
Merge multiple context managers in tests ( #48146 )
2021-03-27 09:17:15 +01:00
J. Nick Koston
b50dcef94f
Block detectable I/O in the event loop ( #48387 )
...
We added a warning when this happens last April and gave developers
a year to fix the instability. We now prevent the instability by
raising RuntimeError when code attempts to do known I/O in the
event loop instead of the executor.
We now provide a suggestion on how to fix the code that is causing
the issue.
2021-03-27 08:54:49 +01:00
J. Nick Koston
c340a39275
Handle range conversions that do not start at 1 ( #48298 )
2021-03-24 12:33:44 -10:00
Franck Nijhof
6932cf9534
Use contextlib.suppress where possible ( #48189 )
2021-03-23 14:36:43 +01:00
Franck Nijhof
5a2b5fe7c5
Yoda assertion style removed is ( #48142 )
2021-03-20 13:55:10 +01:00
Franck Nijhof
e47d8da3b4
Remove defunct test from percentage util ( #48125 )
2021-03-19 17:16:45 -05:00
Franck Nijhof
8a56dbf587
Add flake8 comprehensions checks to pre-commit & CI ( #48111 )
2021-03-19 13:41:09 +01:00
Paulus Schoutsen
7fe3c472e9
Improve bad JSON data reporting ( #47932 )
...
* Improve bad data reporting
* Fix tests
Co-authored-by: Erik <erik@montnemery.com>
2021-03-15 10:41:25 +01:00
J. Nick Koston
9a686d148e
Ensure startup can proceed when there is package metadata cruft ( #47706 )
...
If a package fails to install or partially installed importlib
version can return None. We now try pkg_resources first, then
try importlib, and handle the case where version unexpectedly
returns None
2021-03-10 21:12:02 -10:00
Paulus Schoutsen
2df644c6cc
Clean up secret loading ( #47034 )
2021-03-02 12:58:53 -08:00
Paulus Schoutsen
633a7aeb22
Remove deprecated credstash + keyring ( #47033 )
2021-02-25 09:48:19 +01:00
Tom Parker-Shemilt
27d16af36b
Don't allow recursive secrets loading ( #41812 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-14 14:23:31 +01:00
J. Nick Koston
9f59515bb8
Fix shutdown deadlock with run_callback_threadsafe ( #45807 )
2021-02-01 10:54:39 +01:00
J. Nick Koston
068d1b5eb8
Separate fan speeds into percentages and presets modes ( #45407 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: John Carr <john.carr@unrouted.co.uk>
2021-01-27 17:44:36 -06:00
Thomas Hollstegge
78b057ce02
Make sure generated slugs are not empty ( #43153 )
2021-01-27 12:25:49 +01:00
Joakim Sørensen
b1c2cde40b
Changes to filename and path validation ( #45529 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-01-26 15:53:21 +01:00
Paulus Schoutsen
0930aae208
Avoid misuse sanitize_path, clarify docs ( #45469 )
2021-01-23 18:28:57 +01:00
Pascal Vizeli
a7a4875f52
Add more debug details to running timeouts ( #43644 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-01-04 13:10:39 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest ( #44746 )
2021-01-01 22:31:56 +01:00
Paulus Schoutsen
1c9c99571e
Use !input instead of !placeholder ( #43820 )
...
* Use !input instead of !placeholder
* Update input name
* Lint
* Move tests around
2020-12-01 18:21:36 +01:00
J. Nick Koston
94bf55e29b
Limit concurrency of async_get_integration to avoid creating extra threads ( #43085 )
...
* Limit concurrency of async_get_integration to avoid creating extra threads
Since async_get_integration is waiting on the disk most of the time
it would end up creating many new threads because the disk could
not deliver the data in time.
* pylint
2020-11-10 21:34:54 -10:00
springstan
67b3552165
Add more units to distance conversion util ( #40181 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-11-09 11:38:15 +01:00
Paulus Schoutsen
0fb587727c
Add initial blueprint support ( #42469 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-11-02 15:00:13 +01:00
Dmitry
b106149588
Fix string parameter processing in parse_time_expression ( #41468 ) ( #41469 )
2020-10-09 11:48:49 +02:00
J. Nick Koston
8d5c124deb
Improve performance of generating non-cryptographically secure uuids ( #41314 )
2020-10-07 16:37:01 +02:00
J. Nick Koston
e08ee282ab
Abort execution of template renders that overwhelm the system ( #40647 )
2020-09-28 14:43:22 +02:00
J. Nick Koston
f8704a2dfc
Ensure we always fire time pattern changes after microsecond 0 ( #39302 )
2020-08-28 16:27:25 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 ( #39287 )
2020-08-27 13:56:20 +02:00
Paulus Schoutsen
51a63c1fc4
Drop last bits of asyncio.coroutine ( #39280 )
2020-08-26 16:57:52 +02:00
J. Nick Koston
bee6d87e7a
Standardize uuid generation for events/storage/registry ( #39184 )
2020-08-24 17:21:30 +02:00
Bas Nijholt
0427d87ba4
Bump codespell from v1.16.0 to v1.17.1 and fix new spelling errors ( #38663 )
2020-08-08 14:41:02 +02:00
Pascal Vizeli
c291d4aa7d
Intelligent timeout handler for setup/bootstrap ( #38329 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-05 14:58:19 +02:00
J. Nick Koston
a91f5b7192
Prevent ping integration from blocking startup ( #38504 )
2020-08-05 12:43:35 +02:00
Jelle Raaijmakers
ef254a1c3d
Round time values in get_age() to better approximate the actual age ( #37125 )
2020-07-09 11:19:38 -07:00
Paulus Schoutsen
3ee3ae7633
Fix cloudhooks coming in for non existing webhooks ( #36836 )
...
* Fix cloudhooks coming in for non existing webhooks
* Fix tests"
2020-06-15 16:30:40 -07:00
Paulus Schoutsen
fae80621fb
Guard blowing up converting 0 mired/kelvin ( #35486 )
2020-06-04 08:48:39 -07:00
J. Nick Koston
1297a09344
Avoid locking in the logging queue handler ( #35700 )
...
* Avoid locking in the logging queue handler
We do not need a lock here as the underlying queue is already
thread safe.
* Add coverage for logging handle
2020-05-17 14:39:27 +02:00
J. Nick Koston
73616520c0
Use built in queue log handlers to avoid formatting logs in the event loop ( #35633 )
...
* Use built in queue log handlers to avoid formatting logs in the event loop
Logging is now formatted and written in another thread to
ensure there is minimal impact on the event loop when
a log message is processed.
This change replaces the existing AsyncHandler log handler
as python 3.7+ now offers an off the shelf solution
* add a simple test
* s/async_migrate_log_handlers_to_queue/async_activate_log_queue_handler/g
2020-05-16 09:29:58 -05:00
Franck Nijhof
2223592486
Add get_url helper, deprecate base_url ( #35224 )
2020-05-08 02:29:47 +02:00
Erik Montnemery
f1ecac92df
Fail tests if wrapped callbacks or coroutines throw ( #35010 )
2020-05-06 14:14:57 -07:00
Paulus Schoutsen
2af984917e
Use asynctest-mock in most places ( #35109 )
...
* Use asynctest-mock in most places
* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 ( #34901 )
2020-04-30 13:29:50 -07:00
Paulus Schoutsen
e7f8d6bbf7
Fix more tests on Python 3.8 ( #34703 )
2020-04-25 15:52:50 -07:00
Paulus Schoutsen
d011b46985
Patch http.client to not do I/O in the event loop ( #34194 )
2020-04-15 15:32:10 -07:00
Paulus Schoutsen
d93c09327a
Report unserializable data in websocket ( #34072 )
...
* Report unserializable data in websocket
* Fix tests
* log types too
2020-04-13 23:46:41 -07:00
springstan
eae21be5b9
Improve string formatting v6 ( #33698 )
2020-04-07 23:14:28 +02:00
Franck Nijhof
60bc517d01
Collection of core tests improvements ( #33757 )
...
* Collection of core tests improvements
* Added some more
* Fix aiohttp client response release
2020-04-07 09:33:23 -07:00
J. Nick Koston
4a32a0f1da
Expand network util to check for link local addresses ( #33499 )
2020-04-01 11:24:30 -07:00
Paulus Schoutsen
a6b5d73f1c
Report which data causes JSON serialization error ( #31901 )
2020-02-17 10:49:42 -08:00
Ville Skyttä
5e2ba2eb77
Enable some more bandit checks ( #30857 )
...
* Enable B108 (hardcoded tmp dir), address findings
* Enable B602 (subprocess popen with shell), address findings
* Enable B604 (start process with shell), address findings
* Enable B306 (mktemp), B307 (eval), and B325 (tempnam), no issues to address
2020-01-20 18:44:55 +02:00
Paulus Schoutsen
e1205409f3
Handle location API being exhausted ( #30798 )
2020-01-16 17:31:12 +01:00
Ville Skyttä
5216477353
Be consistent with Home Assistant and Hass.io spelling ( #30500 )
...
* Be consistent with Home Assistant spelling
* Be consistent with Hass.io spelling
2020-01-05 14:09:17 +02:00
Ville Skyttä
e6388e186c
Remove unnecessary string literal concatenations ( #30360 )
2020-01-02 21:17:10 +02:00
Ville Skyttä
445fd15f76
Drop Python 3.6 support ( #29978 )
2019-12-16 07:29:19 +01:00
Bas Nijholt
f60125b5c9
Sort imports according to PEP8 for 'tests' ( #29791 )
2019-12-09 16:52:24 +01:00
Ville Skyttä
d88ca0f5cb
Lint exclusions ( #28655 )
...
* Remove malformed pylint disable markers
* Remove some unused imports
* Remove some unneeded lint exclusions
* Remove more unneeded lint exclusions
* Add specific codes to all noqa's
2019-11-16 10:22:07 +01:00
Tim Gates
c3f07347a1
Fix simple typo: unhasable -> unhashable ( #28605 )
2019-11-07 12:39:16 +01:00
Franck Nijhof
2e17ad86af
Adds guards for missing information in call stack frames ( #27217 )
2019-10-05 11:59:33 +02:00
Pascal Vizeli
c1851a2d94
Cleanup coroutine threadsafe ( #27080 )
...
* Cleanup coroutine threadsafe
* fix lint
* Fix typing
* Fix tests
* Fix black
2019-10-01 16:59:06 +02:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Paulus Schoutsen
7d33b0a259
Fix broken test in Python 3.7 ( #25067 )
2019-07-10 12:17:10 -07:00
Anders Melchiorsen
a439e087e1
Fix time expression parsing ( #24696 )
2019-06-22 13:39:33 +02:00
Pascal Vizeli
c9453bab19
Prefere binary with wheels ( #24669 )
2019-06-21 08:47:56 -07:00
Pascal Vizeli
d9852bc75d
Support Hass.io wheels / docker env ( #24175 )
...
* Support Hass.io wheels / docker env
* address comments
* fix lint
2019-05-29 15:30:09 -07:00
Paulus Schoutsen
179fb0f3b5
Use importlib metadata to check installed packages ( #24114 )
...
* Use importlib metadata
* Fix script
* Remove unused import
* Update requirements"
2019-05-26 11:58:42 -07:00
Paulus Schoutsen
9e96397e6a
Require core config detection to be triggerd manually ( #24019 )
...
* Detect core config
* Remove elevation
* Lint
* Lint
* Fix type
2019-05-22 17:24:46 -07:00
Ties de Kock
4004867eda
Split up yaml loaders into multiple files ( #23774 )
...
* Start moving parts of yaml utils to own module
Move parts of yaml loader out of the single large file and start
to create the structure of the yaml loaders in Ansible [0].
[0]: https://github.com/ansible/ansible/tree/devel/lib/ansible/parsing/yaml
* Finish yaml migration, update tests and mocks
* Move code around to finish the migration
* Update the mocks so that `open` is patched in
`homeassistant.util.yaml.loader` instead of
`homeassistant.util.yaml`.
* Updated mypy ignores
* Updated external API of `homeasistant.util.yaml`, see below:
Checked what part of the api of `homeassistant.util.yaml` was actually
called from outside the tests and added an `__ALL__` that contains only
these elements.
Updated the tests so that references to internal parts of the API (e.g.
the yaml module imported into `homeassistant.util.yaml.loader`) are
referenced directly from `homeassistant.util.yaml.loader`.
In `tests/test_yaml.py` the import `yaml` refers to
`homeassistant.util.yaml` and `yaml_loader` refers to `~.loader`.
Future work that remains for the next iteration is to create a custom
SafeConstructor and refers to that instead of monkey patching `yaml` with
custom loaders.
* Update mocks in yaml dumper, check_config
2019-05-09 09:07:56 -07:00
Paulus Schoutsen
cc13713abd
No longer rely on requests ( #23685 )
...
* No longer rely on requests
* Lint
* Missed a few parts
* Fix types
* Fix more types
* Update __main__.py
* Fix tests
* Lint
* Fix script
2019-05-08 11:15:04 -07:00
Erik Montnemery
407e0c58f9
Migrate tests to pytest ( #23544 )
...
* Migrate tests to pytest
* Fixup
* Use loop fixture in test_check_config
* Lint
2019-04-30 09:20:38 -07:00