Commit Graph

58 Commits (1020d75b94a4b628f63fe1eb3e4f1457989c9ae6)

Author SHA1 Message Date
Joost Lekkerkerker a1906b434f
Change trigger platform key to trigger (#124357)
* fix

* Fix

* Fix

* Update homeassistant/helpers/config_validation.py

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

* Fix

* Fix

* Fix

* Fix

* Add more tests

* Fix

* Fix tests

* Add tests

* Let's see what the CI does

* It fails on the code that tested the thing ofc

* It fails on the code that tested the thing ofc

* Revert test thingy

* Now the test works again, lovely

* Another one

* Fix websocket thingy

* Only copy when needed

* Improve comment

* Remove test

* Fix docstring

* I think this now also work since this transforms trigger to platform

* Add comment

* Update homeassistant/helpers/config_validation.py

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

* Update homeassistant/helpers/config_validation.py

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

* Update homeassistant/helpers/config_validation.py

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

* Check for mapping

* Add test

* Update homeassistant/helpers/config_validation.py

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

* Update test to also test for trigger keys

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-09-25 14:19:58 +02:00
Franck Nijhof 9dfabc3fb7
Adjust automation to plural triggers/conditions/actions keys (#123823)
* Adjust automation to plural triggers/conditions/actions keys

* Fix some tests

* Adjust websocket tests

* Fix search tests

* Convert blueprint and blueprint inputs to modern schema

* Pass schema when creating Blueprint object

* Update tests

* Adjust websocket api

---------

Co-authored-by: Joostlek <joostlek@outlook.com>
Co-authored-by: Erik <erik@montnemery.com>
2024-09-24 20:03:23 +02:00
Lukas Kolletzki 5766ea9541
Add generic URL handler to blueprint importer (#110576)
* Add generic url handler to blueprint importer

* Update tests/components/blueprint/test_importer.py

* Update tests/components/blueprint/test_importer.py

* Update test_importer.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-07-31 08:26:57 +02:00
Marc Mueller 2f0dd6f704
Import Generator from collections.abc (2) (#120915) 2024-07-01 11:58:49 +02:00
Erik Montnemery 7d2ae5b3a5
Add WS command blueprint/substitute (#119890) 2024-06-25 20:15:11 +02:00
Erik Montnemery f32cb8545c
Use MockHAClientWebSocket.send_json_auto_id in blueprint tests (#119956) 2024-06-19 23:07:56 +02:00
epenet 7388271689
Fix unspecified-encoding warnings in tests (#119405) 2024-06-11 17:58:40 +02:00
epenet 2d2f5de191
Improve type hints in blueprint tests (#119263) 2024-06-10 08:49:18 +02:00
Marc Mueller 279483ddb0
Import Generator from typing_extensions (2) (#118989) 2024-06-06 17:24:22 +02:00
epenet b54a68750b
Add type hints for FixtureRequest in tests (#118779) 2024-06-04 10:37:54 +02:00
epenet 77c627e6f3
Fix incorrect blueprint type hints in tests (#118694) 2024-06-03 10:19:13 +02:00
epenet 1fbf93fd36
Add SnapshotAssertion type hints in tests (#118371) 2024-05-29 14:11:58 +02:00
karwosts 6e5dcd8b8d
Support in blueprint schema for input sections (#110513)
* initial commit for sections

* updates

* add description

* fix test

* rename collapsed key

* New schema

* update snapshots

* Testing for sections

* Validate no duplicate input keys across sections

* rename all_inputs

* Update homeassistant/components/blueprint/models.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-29 13:13:01 +02:00
Erik Montnemery db8597a742
Reduce scope of JSON/XML test fixtures (#116197) 2024-04-25 19:12:36 -05:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Sid 00ec7f11f0
Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
Jan Bouwhuis 861bb48ab6
Assign specific error code for HomeAssistantError on websocket_api connection exceptions (#104700)
Assign specific error code for HomeAssistantError
2023-11-29 13:07:52 +01:00
Paulus Schoutsen 1cfbdd6a5d
Allow overriding blueprints on import (#103340)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-25 11:49:50 +01:00
Franck Nijhof 4b9bfe9a50
Support importing Blueprints from the Home Assistant websites (#95340)
* Support importing Blueprints from the Home Assistant websites

* Improve test coverage
2023-06-27 12:40:53 -04:00
Jan Bouwhuis ec98e22330
Add type hints for stub_blueprint_populate fixture (#93568)
Add typehints for stub_blueprint_populate fixture
2023-05-26 08:13:13 +02:00
Erik Montnemery 3cca338c6e
Improve blueprint test fixtures (#93519) 2023-05-25 13:45:19 +02:00
Paulus Schoutsen 3f32c5d2ad
Yaml use dict (#88977)
* Use built-in dict instead of OrderedDict

* Use dict instead of OrderedDict in YAML
2023-03-01 12:29:57 -05:00
Paul Bottein e95944bf9f
Add filter options to entity and device selectors (#87536)
* Add support for multiple device classes

* Add support for entity filter selector

* Add support for device filter selector

* Apply suggestions

* Fix wrong property name

* Update snapshot

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-02-27 10:38:18 -05:00
Paulus Schoutsen 2dcc2f88cc
Use snapshots in blueprint import tests (#88843) 2023-02-27 09:57:26 -05:00
epenet 0cf5e9fb4a
Add type hints to integration tests (part 2) (#87789)
* Add type hints to integration tests (part 2)

* typo

* Improve analytics

* Improve automation

* Imrpove bluetooth
2023-02-10 16:05:26 +01:00
epenet 807c69f621
Add type hints to integration tests (b-c) (#87698) 2023-02-08 18:08:43 +01:00
epenet 4142f0d15d
Add return type to tests without arguments (#87613)
* Add return type to tests without arguments

* Black

* Cancel fixture amends
2023-02-07 14:20:06 +01:00
Franck Nijhof 57cf11f067
Enable Ruff PT015 (#86775) 2023-01-27 11:10:29 +01:00
Franck Nijhof 24fdd588fd
Code styling tweaks to the tests - Part 1 (#86192) 2023-01-20 13:52:46 +01:00
Erik Montnemery 284893d942
Fix reload of automation and scripts when blueprint changed (#80322) 2022-10-14 16:43:09 +02:00
Erik Montnemery 2ba0f42acc
Prevent deleting blueprints which are in use (#78444) 2022-09-14 16:47:08 +02:00
J. Nick Koston 034c0c0593
Improve YAML Dump times with C Dumper (#73424) 2022-06-13 13:14:30 -07:00
Paulus Schoutsen b1a04302b5
Stringify enums in selectors (#71441) 2022-05-06 11:25:01 -07:00
Paulus Schoutsen 353cc0b8c2
Fix importing blueprints (#71365)
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-05-05 14:33:17 -07:00
epenet 053c4428a9
Prettify json (component test fixtures) (#68892) 2022-03-30 11:37:17 +02:00
Erik Montnemery 4e7d4db7ae
Align selectors with frontend updates (#67906)
* Align selectors with frontend updates

* Drop metadata from MediaSelector selection

* Adjust blueprint tests

* Address review comments

* Add tests for new selectors

* Don't stringify input

* Require min+max for number selector in slider mode

* vol.Schema does not like static methods

* Tweak
2022-03-10 16:17:59 +01:00
Richard T. Schaefer 15580281a3
Allow area, device, and entity selectors to optionally support multiple selections like target selector (#63138)
* Allow area, device, and entity selectors to optionally support multiple selections like target selector

* Update according to code review comments

* Adjust tests

* Update according to review comments

* Tweak error message for multiple entities

Co-authored-by: Erik <erik@montnemery.com>
2022-03-03 10:35:06 +01:00
Franck Nijhof fa09cf663e
Update black to 22.1.0 (#65788) 2022-02-05 14:19:37 +01:00
Josh Soref 80b367b446
spelling: components/blueprint (#64271)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-01-17 15:10:12 +01:00
Paulus Schoutsen 31153ac155
Move fixtures part 1 (#58902) 2021-11-01 20:47:05 -07:00
Paulus Schoutsen f51e1fcb67
Check for uncaught service not found exceptions (#58010) 2021-11-01 14:33:09 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Bram Kragten 0da312b6f1
Fix importing blueprint from community (#44104) 2020-12-10 16:45:57 +01:00
Paulus Schoutsen d9a86c1145
Fix importing blueprints from forums with HTML entities (#44098) 2020-12-10 11:11:49 +01:00
Paulus Schoutsen ac2af69d26
Fix extracting entity and device IDs from scripts (#44048)
* Fix extracting entity and device IDs from scripts

* Fix extracting from data_template
2020-12-08 13:06:29 +01:00
Paulus Schoutsen 1c9c99571e
Use !input instead of !placeholder (#43820)
* Use !input instead of !placeholder

* Update input name

* Lint

* Move tests around
2020-12-01 18:21:36 +01:00
Paulus Schoutsen cb96bd9d0b
Blueprint config to override blueprint (#43724) 2020-11-28 13:19:58 +01:00
Paulus Schoutsen e1de36fda8
Fix check config (#43663) 2020-11-26 22:25:21 +01:00