Commit Graph

127 Commits

Author SHA1 Message Date
Franck Nijhof 3e85a29b86
Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +02:00
Erik Montnemery 732ce34a66
Remove assert_lists_same test helper (#94904) 2023-06-21 12:10:28 +02:00
Franck Nijhof c3936e6f14
Replace isort with ruff (#94302) 2023-06-08 23:43:56 +02:00
Ludy a310b5c1c3
remove template deprecated function `device_trigger.py` (#93419)
remove template deprecated fun `device_trigger.py`
2023-05-24 09:42:44 +02:00
epenet 92bcb04e4f
Adjust scaffold docstring (#90157)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-03-23 10:13:53 +01:00
epenet bf5f7c53d8
Move mock_setup_entry to conftest (#88484) 2023-03-06 11:31:50 +01:00
epenet bdbec491eb
Enable RUFF ICN001 for registries (#88875)
* Add issue_registry to RUFF extend aliases

* Add area_registry to RUFF extend aliases

* Add device_registry to RUFF extend aliases

* Add entity_registry to RUFF extend aliases

* Adjust scaffold
2023-03-01 12:40:26 -05:00
avee87 ac70612ec5
Improve helper integration scaffold (#88713) 2023-02-27 16:25:27 +01:00
epenet 5dda1de5bd
Adjust async_setup_entry in config_flow scaffold (#88319) 2023-02-17 13:43:56 +01:00
Franck Nijhof 9030ca05b1
Enable Ruff SIM118 (#87772) 2023-02-15 12:39:12 +01:00
Luke bb4d6c0d2c
Rework user_input check in config flow scaffold (#87820)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-02-12 22:02:14 +01:00
Luke 8de321253b
Reorganize manifest scaffold (#87819)
* reorganize manifest.json

* add iot_class to manifest
2023-02-10 07:52:00 +01:00
Erik Montnemery cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Franck Nijhof 769e0356ad
Clean up unnecessary registry mocks from scaffolding templates (#87732) 2023-02-09 08:22:41 +01:00
epenet aa00114c2f
Add return type to async tests without arguments (#87612) 2023-02-07 10:26:56 +01:00
J. Nick Koston 1d1d69ca02
Update scaffold scripts to use async_forward_entry_setups (#86647) 2023-01-25 21:26:31 +01:00
Erik Montnemery 7b5c80720a
Tweak scaffold script (#82705) 2022-11-25 20:12:27 +01:00
Paulus Schoutsen 481205535c
Add PrusaLink integration (#77429)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-08-29 20:45:27 -04:00
Tomasz Wieczorek 50a1de9f73
Add set default for domain for scaffold script (#76628)
* Add set default for domain for scaffold script

* Add default domain for config_flow_discovery integration

* Extend comment explaining usage
2022-08-29 00:02:27 +02:00
Franck Nijhof 6ebdf0580b
Remove last occurrences of RESULT_TYPE_* from codebase (#74670)
Remove last ocurrances of RESULT_TYPE_* from codebase
2022-07-07 22:35:06 +02:00
Paulus Schoutsen 6a3d2e54a2
Handle OAuth2 rejection (#72040) 2022-05-28 20:23:16 -07:00
Franck Nijhof 7d2deae592
Clean up use of deprecated async_get_registry methods (#72001) 2022-05-17 13:40:19 +02:00
Allen Porter 5d32659d17
Update scaffold script to use application_credentials platform (#71881) 2022-05-16 17:11:09 +02:00
Erik Montnemery 64381acbaf
Mark device actions from hidden or auxiliary entities as secondary (#70278) 2022-04-20 10:48:46 -07:00
Raman Gupta b325c112b4
Add SelectorType enum and TypedDicts for each selector's data (#68399)
* rebase off current

* rearrange

* Overload selector function

* Update/fix all selector references

* better typing?

* remove extra option

* move things around

* Switch to Sequence type to avoid ignoring mypy error

* Get rid of ...'s

* Improve typing to reduce number of ignores

* Remove all typing ignores

* Make config optional for selectors that don't need a config

* add missing unit prefixes

* Rename TypedDicts

* Update homeassistant/helpers/selector.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* review feedback

* remove peta from integration integration

* Fix min_max

* Revert change to selector function

* Fix logic

* Add typing for selector classes

* Update selector.py

* Fix indent

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-04-11 09:20:56 +02:00
Allen Porter c07100e519
Move Local OAuth http endpoint registration to auth component (#69507) 2022-04-06 22:34:31 -07:00
Joakim Sørensen f7c936e842
Add scaffold template for backup (#68961) 2022-03-31 14:18:45 +02:00
Erik Montnemery f9f360c64e
Rename helper_config_entry_flow to schema_config_entry_flow (#68924) 2022-03-30 14:36:47 -07:00
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 34063836ba
Fix scaffold script (#68516) 2022-03-22 19:51:24 +01:00
Erik Montnemery ead5b3e2c0
Improve strings for helper flow scaffold (#68257) 2022-03-17 13:14:38 +01:00
Erik Montnemery f0dba8ec70
Add scaffold for helper integration config flow (#67803) 2022-03-16 12:57:56 +01:00
Paulus Schoutsen 58321c50e1
Fix scaffold (#67769) 2022-03-07 01:13:39 +01:00
Erik Montnemery 209a5854f8
End JSON files updated by scaffold script with a newline (#67639) 2022-03-04 15:50:23 +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