Commit Graph

128 Commits

Author SHA1 Message Date
Franck Nijhof
8aff8d89d2 Clean up async_reproduce_state helper usage (#68617) 2022-03-24 14:40:54 +01:00
Erik Montnemery
c44d7205cf Rename HelperFlowStep to HelperFlowFormStep (#68583) 2022-03-23 14:43:11 -07:00
Erik Montnemery
a50bac5cc2 Make initial group config flow step a menu (#68565) 2022-03-23 08:34:44 -07:00
Erik Montnemery
f0dba8ec70 Add scaffold for helper integration config flow (#67803) 2022-03-16 12:57:56 +01:00
Joakim Sørensen
4e6f35f4fb Use assignment expression for unload_ok in scaffold templates (#64286) 2022-01-17 14:49:26 +01:00
Joakim Sørensen
5a33610739 Use Platform enum in scaffold templates (#64091) 2022-01-14 02:13:56 +02:00
Marc Mueller
d057850971 Update typing - collections.abc (3) (#63947) 2022-01-12 08:04:17 +01:00
Ville Skyttä
334c6c5c02 Make device automation type an enum (#62354) 2021-12-20 19:16:30 +01:00
Erik Montnemery
0e3bc21d54 Teach state and numeric_state conditions about entity registry ids (#60841) 2021-12-02 14:55:12 -08:00
Erik Montnemery
c85bb27d0d Teach state trigger about entity registry ids (#60271)
* Teach state trigger about entity registry ids

* Tweak

* Add tests

* Tweak tests

* Fix tests

* Resolve entity ids during config validation

* Update device_triggers

* Fix mistake

* Tweak trigger validator to ensure we don't modify the original config

* Add index from entry id to entry

* Update scaffold

* Pre-compile UUID regex

* Address review comment

* Tweak mock_registry

* Tweak

* Apply suggestion from code review
2021-12-02 14:26:45 +01:00
Erik Montnemery
caf5ee2fab Remove optional validation when creating conditions (#60481) 2021-11-28 14:54:07 +01:00
Paulus Schoutsen
a4d9019ffc Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
Ville Skyttä
b10fc89a6b Automation trigger info type hint improvements (#55402)
* Make automation trigger info a TypedDict

* zwave_js trigger type hint fixes

* Remove redundant automation trigger info field presence checks

* Use async_initialize_triggers in mqtt and tasmota device_trigger tests
2021-09-04 02:25:51 +02:00
Tomasz Wieczorek
501e7c84be Type scaffold PLATFORMS (#55699)
* Added template base type

Proposition to add typing, as pre-commit test on newly created integrations fails on it automatically:

```
homeassistant/components/<my_integration>/__init__.py:11: error: Need type annotation for "PLATFORMS" (hint: "PLATFORMS: List[<type>] = ...")  [var-annotated]
Found 1 error in 1 file (checked 4 source files)
```

I believe there shouldn't be other type than text, hence the proposition.

* Apply suggestions from code review

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
2021-09-04 01:21:18 +02:00
Erik Montnemery
cdaba62d2c Add test fixture for unauthenticated HTTP client (#55561)
* Add test fixture for unauthenticated HTTP client

* Remove things from the future
2021-09-02 13:09:16 +02:00
Ville Skyttä
0095c6baeb Improve device trigger type hinting (#54907) 2021-08-22 20:32:50 +02:00
Ville Skyttä
4bb2c6e00f Improve device action type hinting (#54850)
* Improve device action type hinting

* More precise _async_get_automations type hints

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-20 07:13:25 +03:00
Paulus Schoutsen
4ae2a26aa3 Add config flow to Rainforest EAGLE-200 (#54846)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-19 09:22:30 -07:00
Ville Skyttä
939fde0a50 ConfigType and async_setup/setup type hint improvements (#54739) 2021-08-18 13:22:05 +02:00
Paulus Schoutsen
989839a1a9 Generate const files for config flow scaffolds (#53064) 2021-07-15 19:57:06 +02:00
Milan Meulemans
63e20f2ced Mark config flow fields as required (#51898)
* flo

* goalzero

* mutesync

* ring

* roon

* risco

* Ruckus Unleashed

* Scaffold template
2021-06-15 19:21:30 +02:00
Erik Montnemery
bf6a412be0 Tweak device action scaffold, fix typo (#51751) 2021-06-11 23:22:18 +02:00
Erik Montnemery
76c3058d15 Rename device trigger base schema to DEVICE_TRIGGER_BASE_SCHEMA (#51719) 2021-06-10 19:11:38 +02:00
Erik Montnemery
04e9acc20a Simplify device condition code (#51266) 2021-05-31 09:47:30 +02:00
Erik Montnemery
489c73b4da Simplify device action code (#51263) 2021-05-31 09:47:15 +02:00
Ville Skyttä
c2f5dcefa5 Use flow result type constants more (#51122) 2021-05-29 14:09:13 +02:00
Milan Meulemans
5491040693 Fix missing link in scaffold comment (#50936) 2021-05-21 21:21:26 +02:00
Franck Nijhof
96f69fb9fb Finalize clean up connection classes (#49895) 2021-05-04 20:08:51 +02:00
Franck Nijhof
c68b259bd3 Cleanup of unused connection_class logic (#49865)
Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2021-04-29 23:12:58 +02:00
Ruslan Sayfutdinov
a4db35a16e Rename FlowResultDict in scaffold template (#49858) 2021-04-29 17:10:31 +02:00
J. Nick Koston
51be2f860a Reduce boilerplate to setup config entry platforms A-C (#49681)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-26 07:46:55 -10:00
Paulus Schoutsen
9f8e683ae3 Ask for IoT class during scaffold (#49647)
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-25 12:13:22 +02:00
Milan Meulemans
48695869f9 Change dict[str, Any] to FlowResultDict (#49546) 2021-04-22 17:23:15 -10:00
Erik Montnemery
b26779a27a Add id to automation triggers (#48464) 2021-03-31 14:56:04 +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
Franck Nijhof
52475c108f Make integration setup optional (#48381) 2021-03-29 13:53:47 -07:00
Franck Nijhof
d2d78d6205 Extend typing on scaffold templates (#48232) 2021-03-26 15:19:44 +01:00
Marc Mueller
4cb7718192 Update typing 16 (#48087) 2021-03-18 22:58:19 +01:00
Quentame
198ecb0945 Uniformize platform setup (#47101)
* A platform is not a component

* Fix dynalite

* SUPPORTED_PLATFORMS --> PLATFORMS

* In tests

* In tests 2

* Fix SmartThings

* Fix ZHA test

* Fix Z-Wave

* Revert Z-Wave

* Use PLATFORMS const in ambient_station

* Fix ihc comment
2021-03-02 21:43:59 +01:00
Martin Hjelmare
568180632e Fix sync oath2 scaffold template (#46219) 2021-02-08 15:00:17 +01:00
Erik Montnemery
f99c27c6d4 Remove unneeded from_state from device triggers (#45152) 2021-02-08 11:09:45 +01:00
Paulus Schoutsen
352d0870e3 Light significant changes + sensor tweaks (#45583) 2021-01-26 22:11:06 +01:00
Paulus Schoutsen
712a5a098d Add significant change filtering to Google (#45566) 2021-01-26 21:45:09 +01:00
Paulus Schoutsen
d082be787f Add "significant change" base (#45555) 2021-01-26 14:13:27 +01:00
Paulus Schoutsen
e584902b8b Remove empty schema (#45044) 2021-01-11 14:25:09 +01:00
Franck Nijhof
65cf2fcb6f Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Paulus Schoutsen
7d23ff6511 Add device action to mobile app to notify (#43814) 2020-12-01 18:14:01 +01:00
Paulus Schoutsen
f9fa24950b OAuth2 to use current request header (#43668) 2020-11-27 08:55:34 +01:00
Paulus Schoutsen
1c36bf5e19 Fix block till done in create entry config flow tests (#42290) 2020-10-24 16:20:56 +02:00
Paulus Schoutsen
e7b6903ef4 Improve the readability of the config flow code (#42169) 2020-10-22 13:00:55 +02:00