Commit graph

1879 commits

Author SHA1 Message Date
Marc Mueller
5d2e5d2612
Import Protocol from typing (#52848) 2021-07-12 10:35:17 +02:00
Erik Montnemery
1cc8280959
Enable basic type checking for the homeassistant component (#52464)
* Enable basic type checking for the homeassistant component

* Tweak
2021-07-05 11:26:31 +02:00
Erik Montnemery
14dd6478d1
Enable basic type checking for trace (#52468) 2021-07-03 17:52:31 +02:00
Shay Levy
ab73ce00a0
Change "Not adding entity" log level to debug (#52240) 2021-06-28 11:22:10 +02:00
Raman Gupta
bef8be9256
Support dynamic schema validation in device conditions and actions (#52007)
* Allow integrations to provide dynamic schema validation in device conditions and actions

* Add tests

* re-add type

* mypy
2021-06-28 09:23:46 +02:00
Erik Montnemery
b916247e8e
Improve editing of device automation referring non added select entity (#52047)
* Improve editing of device automation referring non added select entity

* Update tests
2021-06-21 14:49:51 +02:00
Erik Montnemery
4c9f12b9c5
Correct trace path for trigger with custom id (#51847) 2021-06-14 17:09:20 +02:00
Eduard van Valkenburg
779ef3c8e1
Add timedelta option for async_call_later (#50164) 2021-06-12 13:14:35 +02:00
Erik Montnemery
b01b33c304
Add trigger condition (#51710)
* Add trigger condition

* Tweaks, add tests
2021-06-11 15:05:57 +02:00
Erik Montnemery
ba6b527d61
Improve editing of device actions referencing non-added HVAC (#51706)
* Improve editing of device actions referencing non-added HVAC

* Improve test coverage
2021-06-11 11:13:55 +02:00
Erik Montnemery
49bec86dae
Add base schema for triggers (#51727)
* Add base schema for triggers

* Tweak

* Make TRIGGER_BASE_SCHEMA a voluptuous schema

* Make state trigger BASE_SCHEMA a voluptuous schema
2021-06-11 09:51:12 +02:00
Erik Montnemery
a1e3283f8f
Improve editing of device automations referencing non-added sensors (#51312) 2021-06-08 23:28:08 -07:00
Franck Nijhof
4c51299dcc
Add easy converting string timestamps/dates to datetime objects in templates (#51576) 2021-06-07 15:02:15 +02:00
Franck Nijhof
f35929ba63
Allow referencing sensor entities for before/after in time conditions (#51444)
* Allow referencing sensor entities for before/after in time conditions

* Fix typo in variable naming

* Improve test coverage
2021-06-07 14:50:31 +02:00
Franck Nijhof
05241a7a68
Allow number/sensor entities in numeric state conditions/triggers (#51439) 2021-06-04 18:14:48 +02:00
Paulus Schoutsen
ede7932a57
Protect our user agent (#51486)
* Protect our user agent

* Fix expected error
2021-06-04 09:14:18 -07:00
Franck Nijhof
d51fc5814a
Define ToggleEntity entity attributes as class variables (#51231)
* Define ToggleEntity entity attributes as class variables

* Fix upcloud overriding state property

* Implement available state for upcloud, to compensate removed state
2021-06-02 08:53:55 +02:00
Paulus Schoutsen
ee2c950716
Merge system options into pref properties (#51347)
* Make system options future proof

* Update tests

* Add types
2021-06-01 22:34:31 +02:00
Franck Nijhof
c5dc99c052
Fix time condition microsecond offset when using input helpers (#51337) 2021-06-01 17:57:23 +02:00
Erik Montnemery
63e16de6c0
Improve time condition trace (#51335) 2021-06-01 17:07:45 +02:00
Paulus Schoutsen
45e1473f83
Improve config validation for key_value_schemas (#49429) 2021-06-01 11:23:59 +02:00
Paulus Schoutsen
f472219c68
Set up cloud semi-dependencies at start (#51313) 2021-06-01 01:35:31 +02:00
Paulus Schoutsen
4821484d2c
Add system option to disable polling (#51299) 2021-05-31 15:36:40 -07:00
Erik Montnemery
837220cce4
Add deprecated backwards compatible history.LazyState (#51144) 2021-05-28 11:01:28 +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
Erik Montnemery
abd6f739e8
Pylint fix (#51083) 2021-05-25 10:53:18 -07:00
Erik Montnemery
7b5e63132c
Prevent parallel reload of automations (#50008) 2021-05-25 08:50:50 -07:00
Matt Zimmerman
e964c607a3
jinja2.contextfilter decorator renamed to pass_context (#51007)
* jinja2.contextfilter decorator renamed to pass_context

* bump jinja2 dependency
2021-05-24 17:38:37 +02:00
Ruslan Sayfutdinov
44bbd9396d
Fix typing in config flow helper (#50994) 2021-05-23 14:08:21 +02:00
Franck Nijhof
38d095aa18
Define entity attributes as entity class variables (#50925)
* Define entity attributes as entity class variables

* Example coronavirus integration

* Example verisure

* Cleanup/typing fixes

* Fix Coronavirus

* Revert "Fix Coronavirus"

This reverts commit 060843860f.

* Revert "Cleanup/typing fixes"

This reverts commit 659b79e75a.

* Define entity attributes as entity class variables (attr alternative)

* Example coronavirus

* Example nut

* Example verisure

* Mark private

* Cleanup after all reverting/cherrypicking/merging

* Implement all entity properties

* Update coronavirus example

* Update nut example

* Update verisure example

* Lets not talk about this one...

* Fix multiple class attribute
2021-05-22 09:13:50 -07:00
Ruslan Sayfutdinov
391b2f8ccd
Add missing return type in Core constructors (#50884) 2021-05-20 18:53:29 +03:00
Erik Montnemery
1ea0d8ae02
Correct trace of condition actions (#50800) 2021-05-17 16:54:17 -07:00
Ruslan Sayfutdinov
6b38adaa3d
Downgrade setuptools to fix CI (#50734) 2021-05-16 20:36:23 -07:00
Ville Skyttä
ed10856cc4
UpCloud API and typing update (#50624) 2021-05-14 21:49:41 -07:00
Martin Hjelmare
e32dc306e1
Fix oauth2 helper user step typing (#50618) 2021-05-14 23:39:14 +02:00
Erik Montnemery
bcd8f43e7b
Update light intents to check supported_color_modes (#50625) 2021-05-14 14:23:29 -07:00
Ruslan Sayfutdinov
0cb08f9516
Add missing type hints in entity_platform (#50453) 2021-05-12 16:28:44 +02:00
Erik Montnemery
b35f229674
Include _StopScript.__cause__ in trace (#50441)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-05-11 22:27:11 -07:00
Martin Hjelmare
7c4893cbb1
Fix event action return value typing (#50353)
Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
2021-05-11 16:23:59 +02:00
Ruslan Sayfutdinov
ce15f28642
Add missing type hints in http component (#50411) 2021-05-10 14:30:47 -07:00
Ville Skyttä
b89c53f759
Type hint device registry identifiers as set of str 2-tuples (#50355)
* Type hint device registry identifiers as set of str 2-tuples

* Fix airly test

* Really fix airly test, add another migration test
2021-05-10 12:13:45 +02:00
Franck Nijhof
44383f25ce
Clean up pylint comments (#49334) 2021-05-05 08:56:50 +02:00
Franck Nijhof
96f69fb9fb
Finalize clean up connection classes (#49895) 2021-05-04 20:08:51 +02:00
Franck Nijhof
efb1bb08a4
Add small async_get_current_platform helper method (#50014) 2021-05-03 16:46:42 +02:00
Franck Nijhof
378cee01b4
Add typing to async_register_entity_service (#50015) 2021-05-03 14:22:38 +02:00
Ville Skyttä
ddd7e79ee9
Improve device registry internal typing (#49924) 2021-05-01 12:33:31 -10:00
Franck Nijhof
1b5596b4c2
Remove ServiceCallType alias from codebase (#49844) 2021-05-02 00:15:27 +02:00
Ville Skyttä
59f32f7c9c
Make device info a TypedDict (#49670) 2021-04-30 23:21:39 +02:00
Ruslan Sayfutdinov
f53284b200
Make CoordinatorEntity generic (#49854) 2021-04-30 13:24:27 -07:00
Ville Skyttä
a19f757120
Allow str 1..n-tuples in device registry identifier type hints (#49864)
This reflects current practice, but the intent has been to have them as
2-tuples, and a future change is likely to start enforcing that (again).

Refs https://github.com/home-assistant/core/pull/49670#discussion_r622344872
2021-04-30 08:56:55 +02:00