Commit Graph

84 Commits (be94ce42a5447cbc018fe120e01cf865e114c2a2)

Author SHA1 Message Date
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 0b71055989
Do not automatically add title to strings.json (#53350) 2021-07-22 21:11:10 +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
Martin Hjelmare 3742f175ad
Add missing oauth2 error abort reason (#48112) 2021-03-19 14:27:26 +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
Allen Porter b228ffc761
Add missing config flow translation key to script scaffold (#42621)
Add missing config key for no_url_available when generating new oauth2
config entry based integrations.  This was found in issue #42423 where
the nest integration was missing a string when a user had a misconfiguration.
2020-10-30 09:51:22 +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
Philip Allgaier dde6305549
Cleanup unused loggers (components N-Z + tests) (#41982) 2020-10-16 21:24:08 -05:00
Allen Porter 42cef1773b
Update script scaffold templates for config_flow_oauth2 (#41181)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-10-07 15:23:45 +02:00
Daniel Hjelseth Høyer 9d3ddb8981
Scaffold: correct import (#40998) 2020-10-02 08:32:03 +02:00
Aidan Timson 09efbc569f
Fix oauth2 template by updating outdated method name (#39486) 2020-08-31 10:25:25 +02:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Martin Hjelmare b4142fc7ee
Add const module to oauth2 scaffold template (#35438)
* Add const module to oauth2 template

* Remove const append

* Add domain to const
2020-05-10 12:10:09 +02:00
Paulus Schoutsen 42fc332123
Fix scaffold and hassfest references (#35431) 2020-05-09 15:50:44 -07:00
Paulus Schoutsen 34e35f6aa3
Add config flow base strings (#34523) 2020-05-04 20:10:39 -07:00