1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00
Commit Graph

307 Commits

Author SHA1 Message Date
Martin Hjelmare
a1abd4f0d6
Fix external internal url core check (#54310) 2021-08-09 10:52:14 +02:00
Paulus Schoutsen
952d11cb03
Ensure internal/external URL have no path (#54304)
* Ensure internal/external URL have no path

* Fix comment typo

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-09 09:38:09 +02:00
Franck Nijhof
1968b95829
Add currency core configuration (#53541)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-07-28 08:55:58 +02:00
Marc Mueller
46c3495ae0
Update pylint to 2.9.5 (#53496) 2021-07-26 16:17:15 +02:00
Daniel Hjelseth Høyer
fbad453c89
Pylint 2.9.3 (#52972)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-07-14 21:44:57 -07:00
Paulus Schoutsen
f472219c68
Set up cloud semi-dependencies at start (#51313) 2021-06-01 01:35:31 +02:00
Raman Gupta
58e37435b3
Make more max lengths constants and add additional MaxLengthExceeded checks (#50337)
* Add more MaxLengthExceeded checks

* remove some validations to reduce performance impact

* check length of generated entity ID

* dont check entity ID twice and use single context id length constant

* fix test

* add missing test
2021-05-25 19:58:01 +02:00
Ruslan Sayfutdinov
391b2f8ccd
Add missing return type in Core constructors (#50884) 2021-05-20 18:53:29 +03:00
Ruslan Sayfutdinov
5ad71b5e45
Define sync hass.create_task function (#50788) 2021-05-17 14:54:06 -05: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
Marc Mueller
c07646db5d
Update typing syntax (#49480)
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
J. Nick Koston
04a0ca14e0
Ensure shutdown does not deadlock (#49282) 2021-04-18 08:55:51 -10:00
Ville Skyttä
970cbcbe15
Type hint improvements (#49320) 2021-04-17 08:35:21 +02:00
J. Nick Koston
2cc9ae1af1
Use named constants for core shutdown timeouts (#49146)
This is intended to make them easier to reference outside the core
code base.
2021-04-13 12:21:52 +02:00
Raman Gupta
3ca69f5568
Raise an exception when event_type exceeds the max length (#48115)
* raise an exception when event_type exceeds the max length that the recorder supports

* add test

* use max length constant in recorder

* update config entry reloaded service name

* remove exception string function because it's not needed

* increase limit to 64 and revert event name change

* fix test

* assert exception args

* fix test

* add comment about migration
2021-04-08 20:46:28 +02:00
Marc Mueller
2956eb0902
Update pylint to 2.7.3 (#48488)
* Update pylint to 2.7.3

* Add class-const-naming-style

* Remove unused-import message

* Additional cleanup
2021-03-29 18:02:56 -10:00
J. Nick Koston
c820dd4cb5
Have pylint warn when user visible log messages do not start with capital letter or end with a period (#48064)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-19 09:26:36 -05:00
Marc Mueller
4cb7718192
Update typing 16 (#48087) 2021-03-18 22:58:19 +01:00
Marc Mueller
e55702d635
Update typing 01 (#48013) 2021-03-17 17:34:55 +01:00
Ville Skyttä
dc880118a4
Lint suppression cleanups (#47248)
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
Marc Mueller
16dcbf1467
Update pylint (#47205) 2021-02-28 22:09:01 -10:00
J. Nick Koston
c9df42b69a
Add support for pre-filtering events to the event bus (#46371) 2021-02-14 09:42:55 -10:00
Franck Nijhof
22389043eb
Remove base_url fallback (#46316) 2021-02-10 14:31:11 +01:00
Bram Kragten
4b493c5ab9
Add target to service call API (#45898)
* Add target to service call API

* Fix _async_call_service_step

* CONF_SERVICE_ENTITY_ID overrules target

* Move merging up before processing schema

* Restore services.yaml

* Add test
2021-02-10 12:42:28 +01:00
J. Nick Koston
9f59515bb8
Fix shutdown deadlock with run_callback_threadsafe (#45807) 2021-02-01 10:54:39 +01:00
Ville Skyttä
d13b58a4e6
Upgrade mypy to 0.800 (#45485)
* Upgrade mypy to 0.800

https://mypy-lang.blogspot.com/2021/01/mypy-0800-released.html

* Fix issues flagged by mypy 0.800

* Add overloads + small changes

* Apply grammar

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-30 22:33:53 +01:00
Philip Allgaier
52cfc06e12
Replace outdated / closed URL for reporting HA startup blocks (#45334) 2021-01-19 11:01:51 -05:00
Ville Skyttä
94dbcc9d2b
Generics and other type hint improvements (#45250) 2021-01-18 22:23:25 +01:00
Philip Allgaier
41b45c7f78
Auto-create friendly name for persistent notifications (#42427) 2021-01-15 12:13:56 +01:00
Ville Skyttä
43474762b2
Drop remaining Python < 3.8 support (#44743)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-01-04 11:47:29 +01:00
Philip Allgaier
392c058d34
Ensure consistent spelling of "ID" (#44585) 2020-12-28 18:34:08 +01:00
Ville Skyttä
317ed418dd
Use singleton enum for "not set" sentinels (#41990)
* Use singleton enum for "not set" sentinel

https://www.python.org/dev/peps/pep-0484/#support-for-singleton-types-in-unions

* Remove unused variable
2020-12-19 12:46:27 +01:00
Paulus Schoutsen
edf70e9f06
Make input_datetime better handle timezones (#43396)
* Make input_datetime better handle timezones

* Improve test coverage

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Revert change to time format

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-11-26 20:20:10 +01:00
Paulus Schoutsen
819dd27925
Automatically clean up executor as part of closing loop (#43284) 2020-11-16 15:43:48 +01:00
Franck Nijhof
6e9b65405a
Disable legacy templates by default (#42967) 2020-11-08 16:11:38 +01:00
J. Nick Koston
1626c236dc
Only call utcnow once during a state changed event (#42941) 2020-11-07 15:51:06 -10:00
J. Nick Koston
2bbd2a6e70
Reduce complexity of storage writes (#42576)
* Reduce complexity of storage writes

* add test

* stop hass

* workaround bad test
2020-10-29 22:35:51 -05:00
Paulus Schoutsen
21e9e7c5c2
Default legacy templates to true (#42511)
* Default legacy templates to true

* Disable legacy_templates in tests

Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-10-28 16:58:16 +01:00
J. Nick Koston
df2ede6522
Fix state overwrite race condition where two platforms request the same entity_id (#42151)
* Fix state overwrite race condition where two platforms request the same entity id

* fix test

* create reservations instead

* revert

* cannot use __slots__ because we patch async_all
2020-10-21 17:01:51 +02:00
Paulus Schoutsen
b8417a2ce2
Do not allow coroutines to be passed to HassJob (#42073)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-10-19 23:25:33 +02:00
J. Nick Koston
afc602595b
Only validate entity id if it did not exist on state change (#41820) 2020-10-14 11:06:51 +02:00
J. Nick Koston
9e1461da62
Determine how to run listeners at setup time instead of execution time (#41304) 2020-10-07 16:51:50 +02:00
J. Nick Koston
8d5c124deb
Improve performance of generating non-cryptographically secure uuids (#41314) 2020-10-07 16:37:01 +02:00
Franck Nijhof
ee914366a8
Add native Python types support to templates (#41227)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-10-07 00:05:52 +02:00
J. Nick Koston
4798f37c6e
Convert States to dicts via as_dict only once (#41208)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-05 09:18:57 -05:00
J. Nick Koston
b45215f1d2
Implement template rate_limit directive (#40667) 2020-10-01 21:39:44 +02:00
J. Nick Koston
e564af0b5b
Improve performance of accessing template state (#40323)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-28 10:35:12 -05:00
J. Nick Koston
3261a904da
Reduce the number of template re-renders when we are only counting states (#40272) 2020-09-26 16:29:49 -05:00
J. Nick Koston
35533407fe
Improve performance of counting and iterating states in templates (#40250)
Co-authored-by: Anders Melchiorsen <amelchio@nogoto.net>
2020-09-26 11:36:47 -05:00