Franck Nijhof
9a1fd913bf
Fix line length violations in tests (non-components) ( #170804 )
...
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: frenck <195327+frenck@users.noreply.github.com >
2026-05-17 10:30:45 -04:00
Artur Pragacz
395d741324
Implement batched service call ( #168175 )
2026-04-16 18:10:43 +02:00
Ariel Ebersberger
cd15261d1c
Fix helper tests for Python 3.14.3 ( #168355 )
2026-04-16 15:56:50 +02:00
Artur Pragacz
cb71628ee2
Validate entity ID domain ( #167228 )
2026-04-07 12:36:37 +02:00
Jan Bouwhuis
10299b2ef4
Add description placeholders to service translation strings ( #154984 )
...
Co-authored-by: Erik Montnemery <erik@montnemery.com >
2025-11-26 09:54:22 +01:00
Erik Montnemery
5bd39804f1
Remove EntityComponent.async_register_legacy_entity_service ( #152539 )
2025-09-18 20:34:25 +02:00
G Johansson
5ccbee4c9a
Break long strings in entity platform/component tests ( #152320 )
2025-09-14 23:27:04 +02:00
G Johansson
af9717c1cd
Raise error for entity services without a correct schema ( #151165 )
2025-09-14 19:17:26 +02:00
epenet
364556a7dd
Prefer from...import...as over import...as in core tests ( #136146 )
2025-01-21 09:28:17 +01:00
epenet
899fb091fc
Simplify access to hass in service calls ( #133062 )
2024-12-13 09:31:21 +01:00
Erik Montnemery
114e254aa6
Don't raise when registering entity service with invalid schema ( #125057 )
...
* Don't raise when registering entity service with invalid schema
* Update homeassistant/helpers/service.py
Co-authored-by: Robert Resch <robert@resch.dev >
---------
Co-authored-by: Robert Resch <robert@resch.dev >
2024-09-02 14:20:50 +02:00
Erik Montnemery
55c42fde88
Improve validation of entity service schemas ( #124102 )
...
* Improve validation of entity service schemas
* Update tests/helpers/test_entity_platform.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com >
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com >
2024-08-27 19:05:49 +02:00
Erik Montnemery
14a3217d7e
Improve entity platform tests ( #124051 )
2024-08-16 15:08:37 +02:00
Erik Montnemery
799e95c1bd
Do sanity check in EntityComponent.async_register_entity_service schema ( #124029 )
...
* Do sanity check in EntityComponent.async_register_entity_service schema
* Improve test
2024-08-16 13:39:25 +02:00
Erik Montnemery
e1a0a855d5
Support None schema in EntityComponent.async_register_entity_service ( #123867 )
2024-08-14 11:44:38 +02:00
Joost Lekkerkerker
03c6e0c55f
Fix SIM300 ( #120725 )
2024-06-28 10:46:02 +02:00
epenet
dc6c1f4e87
Add MockPlatform type hints in tests ( #120012 )
...
* Add MockPlatform type hints in tests
* Remove useless code
* Improve
* Revert "Improve"
This reverts commit 9ad04f9255 .
2024-06-21 11:04:15 +02:00
Sid
721b2c2ca8
Enable Ruff PT012 ( #113957 )
2024-06-08 17:59:08 +02:00
J. Nick Koston
84a91a86a9
Improve config entry has already been setup error message ( #117091 )
2024-05-08 14:16:08 -05:00
J. Nick Koston
b41b1bb998
Refactor entity_platform polling to avoid double time fetch ( #116877 )
...
* Refactor entity_platform polling to avoid double time fetch
Replace async_track_time_interval with loop.call_later
to avoid the useless time fetch every time the listener
fired since we always throw it away
* fix test
2024-05-05 16:28:01 -04:00
Erik Montnemery
84e74e4c74
Reverse component path ( #104087 )
...
* Reverse component path
* Update translations helper
* Fix
* Revert incorrect change of PLATFORM_FORMAT
* Fix use of PLATFORM_FORMAT in tts
* Fix ios
2023-12-05 08:43:58 +01:00
Erik Montnemery
4536fb3541
Remove mock_entity_platform test helper ( #104073 )
2023-11-16 16:55:08 +01:00
Kevin Stillhammer
06c9719cd6
Support multiple responses for service calls ( #96370 )
...
* add supports_response to platform entity services
* support multiple entities in entity_service_call
* support legacy response format for service calls
* revert changes to script/shell_command
* add back test for multiple responses for legacy service
* remove SupportsResponse.ONLY_LEGACY
* Apply suggestion
Co-authored-by: Allen Porter <allen.porter@gmail.com >
* test for entity_id remove None
* revert Apply suggestion
* return EntityServiceResponse from _handle_entity_call
* Use asyncio.gather
* EntityServiceResponse not Optional
* styling
---------
Co-authored-by: Allen Porter <allen.porter@gmail.com >
2023-11-02 18:37:35 -07:00
Allen Porter
b9b5fe6be8
Add service response data for listing calendar events ( #94759 )
...
* Add service response data for listing calendar events
Add the capability of response data for for the entity component.
* Rename input arguments and add service description
* Improve list events to be more user friendly
Allow the end date to be determined based on a relative time duration. Make the start time optional and set to "now". Add additional test coverage. Update demo calendar to actually perform date range checks.
* Wrap docstrings properly.
* Increase test coverage
* Update to use new API calls
* Readability improvements
* Wrap docstrings
* Require at least one of end or duration
* Check for multiple entity matches earlier in the request
* Update documentation strings
2023-06-23 23:34:34 -04:00
epenet
ab6e929443
Fix EntityComponent lingering timer in helper tests ( #89801 )
...
* Fix lingering timer in entity platform tests
* Tweak
* Fix entity and entity_component also
* Remove async_shutdown
* Adjust
* Adjust
2023-03-17 10:26:05 +01:00
epenet
46a5aa71ec
Add type hints to helper tests ( #89784 )
2023-03-16 11:10:56 +01:00
epenet
5f25b71df7
Add type hints to core tests ( #88478 )
2023-02-20 11:42:56 +01:00
epenet
c98b4e3204
Add typing to tests with single hass argument (2) ( #87675 )
...
* Add typing to tests with single hass argument (2)
* a few more
2023-02-08 08:51:43 +01:00
krahabb
899342d391
Refactor async_call_later to improve performance and reduce conversion loss ( #87117 )
...
Co-authored-by: J. Nick Koston <nick@koston.org >
2023-02-05 12:04:38 -06:00
epenet
30bf0634fe
Add per-file-ignore to pylint ( #86289 )
2023-01-22 17:26:24 +01:00
J. Nick Koston
fe6a4bfb1d
Remove EVENT_TIME_CHANGED and EVENT_TIMER_OUT_OF_SYNC ( #69643 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com >
2022-04-09 09:05:54 -10:00
Franck Nijhof
d645e80ccd
Clean up async_update_entity helper usage ( #68641 )
2022-03-25 15:22:58 -07:00
J. Nick Koston
44beff31c2
Cancel config entry retry, platform retry, and polling at the stop event ( #49138 )
2021-04-13 16:16:26 -10:00
Franck Nijhof
65cf2fcb6f
Drop asynctest ( #44746 )
2021-01-01 22:31:56 +01:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 ( #39287 )
2020-08-27 13:56:20 +02:00
J. Nick Koston
c03832da63
Fix entity_component test flapping ( #37445 )
2020-07-04 16:55:44 +02:00
Paulus Schoutsen
276f3afb00
Do async_setup_platform in background ( #36244 )
...
Co-authored-by: J. Nick Koston <nick@koston.org >
2020-05-31 22:18:30 -07:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 ( #34901 )
2020-04-30 13:29:50 -07:00
Paulus Schoutsen
aef06a3544
Directly call write state 2 ( #33513 )
...
* Directly call async_write_ha_state pt2
* Directly call async_write_ha_state pt2
* Fix mock
* Address comments
2020-04-03 09:34:50 +02:00
Paulus Schoutsen
f41623ca64
Log warning when entities referenced in service call not found ( #31427 )
...
* Raise entities not found error
* Make it a warning, not an error
* Add support for MATCH_ENTITY_NONE
* Fix lint
* Fix tests
2020-02-04 14:42:07 -08:00
Christian Clauss
df7d2b3aeb
Fix typos found by codespell ( #31243 )
...
* Fix typos found by codespell
* Fix typos found by codespell
* codespell: Furture ==> Future
* Update test_config_flow.py
* Update __init__.py
* Spellcheck: successfull ==> successful
* Codespell: unsuccesful ==> unsuccessful
* Codespell: cant ==> can't
* Codespell: firware ==> firmware
* Codespell: mimick ==> mimic
2020-01-31 08:33:00 -08:00
Paulus Schoutsen
9aa02e35a7
Entity Component to no longer generate automatic groups ( #23789 )
2020-01-07 17:30:53 +01:00
Ville Skyttä
fa4fa30461
Various string cleanups ( #30435 )
...
* Remove some unnecessary string concatenations
* Replace some simple str.formats with f-strings
* Replace some string concatenations with f-strings
2020-01-03 14:47:06 +01:00
Ville Skyttä
e6388e186c
Remove unnecessary string literal concatenations ( #30360 )
2020-01-02 21:17:10 +02:00
Paulus Schoutsen
bb14a083f0
Store capabilities and supported features in entity registry, restore registered entities on startup ( #30094 )
...
* Store capabilities and supported features in entity registry
* Restore states at startup
* Restore non-disabled entities on HA start
* Fix test
* Pass device class from entity platform
* Clean up restored entities from state machine
* Fix Z-Wave test?
2019-12-31 14:29:43 +01:00
Bas Nijholt
f60125b5c9
Sort imports according to PEP8 for 'tests' ( #29791 )
2019-12-09 16:52:24 +01:00
Paulus Schoutsen
02d9ed5e36
Do not select all entities when omitting entity ID in service call ( #29178 )
...
* Do not select all entities when omitting entity ID
* Address comments Matthew
* Require either area_id or entity_id
* Fix tests
* Fix test
2019-12-02 16:23:12 -08:00
Paulus Schoutsen
7a90808e52
Add service to reload scenes from configuration.yaml ( #25680 )
...
* Allow reloading scenes
* Update requirements
* address comments
* fix typing
* fix tests
* Update homeassistant/components/homeassistant/scene.py
Co-Authored-By: Martin Hjelmare <marhje52@kth.se >
* Address comments
2019-08-05 23:04:19 +02:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Erik Montnemery
407e0c58f9
Migrate tests to pytest ( #23544 )
...
* Migrate tests to pytest
* Fixup
* Use loop fixture in test_check_config
* Lint
2019-04-30 09:20:38 -07:00