Commit Graph
202 Commits
Author SHA1 Message Date
Erik MontnemeryandGitHub f01653633d Add shared enable_experimental_triggers_conditions test fixture (#160937) 2026-01-14 16:01:06 +00:00
Abílio CostaandGitHub 4163ecd833 Improve typing for get_x_for_target commands (#159279) 2025-12-18 16:42:40 +00:00
Abílio CostaandGitHub 7eecdc87fd Add lookup caching to get_x_for_target (#157888) 2025-12-16 12:17:58 +00:00
c058810461 Cache flattened service descriptions in websocket api (#157510)
Co-authored-by: Erik Montnemery <[email protected]>
2025-12-04 16:05:49 +00:00
Abílio CostaandGitHub bf7b96622c Correct websocket commands test name (#157870) 2025-12-04 11:14:34 +00:00
f758cfa82f Add get_conditions_for_target websocket command (#157344)
Co-authored-by: Erik Montnemery <[email protected]>
2025-11-26 14:08:56 +00:00
Erik MontnemeryandGitHub 4900d25ac8 Disable experimental triggers according to labs flag setting (#157320) 2025-11-26 14:27:05 +01:00
Abílio CostaandGitHub c2b7a63dd9 Add get_services_for_target websocket command (#157334) 2025-11-26 12:30:51 +00:00
Abílio CostaandGitHub a6aab088fb Add get_triggers_for_target websocket command (#156778) 2025-11-26 11:05:03 +01:00
Jan BouwhuisandGitHub f537204d22 Fix websocket_api timeout test (#157204) 2025-11-24 20:12:32 -06:00
Abílio CostaandGitHub 0f12a40eb2 Fix typing in websocket_api test (#156964) 2025-11-21 16:29:19 +01:00
Erik MontnemeryandGitHub a020a32d8a Remove translations from WS get_services and REST /api/services (#147120) 2025-10-23 17:26:33 +02:00
2abc197dcd Add extract_from_target websocket command (#150124)
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Artur Pragacz <[email protected]>
2025-10-14 16:16:00 +02:00
Marc MuellerandGitHub 1e5f5f4ad3 Enable pylint consider-math-not-float check (#154338) 2025-10-13 21:14:57 +02:00
Erik MontnemeryandGitHub d66da0c10d Respect filtering of WS subscribe_entities when there are unserializalizable states (#153262) 2025-10-02 22:20:45 +02:00
Erik MontnemeryandGitHub ec503618c3 Handle errors in WS manifest/list (#153256) 2025-09-30 15:12:41 +02:00
epenetandGitHub de42ac14ac Drop unused hass argument from internal helper (#152733) 2025-09-22 09:56:52 +02:00
Artur PragaczandGitHub d7e6f84d28 Fix empty selector validation (#151340) 2025-09-01 16:22:41 +02:00
J. Nick KostonandGitHub 671c4e1eab Reduce log spam from unauthenticated websocket connections (#151388) 2025-09-01 10:35:22 +02:00
48091e5995 Improve test of WS command get_services (#150901)
Co-authored-by: Copilot <[email protected]>
2025-08-19 17:47:12 +02:00
Artur PragaczandGitHub 06130219b4 Use relative condition keys (#150021) 2025-08-06 17:20:30 +01:00
Artur PragaczandGitHub 53c9c42148 Use relative trigger keys (#149846) 2025-08-04 23:01:40 +01:00
510fd09163 Allow core integrations to describe their conditions (#147529)
Co-authored-by: Abílio Costa <[email protected]>
2025-07-04 16:03:42 +02:00
1fb587bf03 Allow core integrations to describe their triggers (#147075)
Co-authored-by: Abílio Costa <[email protected]>
2025-06-25 17:35:15 +01:00
Erik MontnemeryandGitHub 2bfb09cb11 Improve test of WS command get_services cache handling (#147134) 2025-06-23 13:29:29 +02:00
Martin HjelmareandGitHub f295d72cd9 Fix error stack trace for HomeAssistantError in websocket service call (#145699)
* Add test

* Fix error stack trace for HomeAssistantError in websocket service call
2025-05-27 12:54:57 +02:00
Erik MontnemeryandGitHub 0128d85999 Move sun conditions to the sun integration (#144742) 2025-05-12 23:03:37 +01:00
Marc MuellerandGitHub 5843e63878 Add contextmanager to reset logger after set_level call in tests (#143295) 2025-04-20 02:13:01 +02:00
0105332476 Add WS command integration/wait (#142040)
* Add WS command integration/wait

* Add test

* Update homeassistant/components/websocket_api/commands.py

Co-authored-by: Martin Hjelmare <[email protected]>

* Use helper setup.async_wait_component

* Add onboarding view

* Revert "Add onboarding view"

This reverts commit df3a1a0580.

---------

Co-authored-by: Martin Hjelmare <[email protected]>
2025-04-11 16:09:15 +02:00
0abe57edaa Avoid checking if debug logging is enabled on every WebSocket message (#142258)
Co-authored-by: epenet <[email protected]>
2025-04-04 22:28:55 +02:00
Erik MontnemeryandGitHub 2427b77363 Use send_json_auto_id in websocket_api tests (#141994) 2025-04-01 14:31:49 +02:00
J. Nick KostonandGitHub fd9f002e9f Increase websocket_api allowed peak time to 10s (#141680)
* Increase websocket_api allowed peak time to 10s

fixes #141624

During integration reload or startup, we can end up sending a message for
each entity being created for integrations that create them from an external
source (ie MQTT) because the messages come in one at a time. This can overload
the loop and/or client for more than 5s. While we have done significant work
to optimize for this path, we are at the limit at what we can expect clients
to be able to process in the time window, so increase the time window.

* adjust test
2025-03-28 20:32:00 +01:00
Erik MontnemeryandGitHub 51c09c2aa4 Add test fixture ignore_translations_for_mock_domains (#139235)
* Add test fixture ignore_translations_for_mock_domains

* Fix fixture

* Avoid unnecessary attempt to get integration

* Really fix fixture

* Add forgotten parameter

* Address review comment
2025-02-25 20:10:29 +01:00
Erik MontnemeryandGitHub b662d32e44 Fix bug in check_translations fixture (#139206)
* Fix bug in check_translations fixture

* Fix check for ignored translation errors

* Fix websocket_api test
2025-02-24 22:19:18 +01:00
Abílio CostaandGitHub 3fb70316da Fix error messaging for cascading service calls (#136966) 2025-01-31 11:10:57 +01:00
J. Nick KostonandGitHub 7cf20c95c2 Log the error when the WebSocket receives a error message (#136492)
* Log the error when the WebSocket receives a non-text message

related issue #126754

Right now we only log that it was a non-Text message
and silently swallow the exception

* coverage
2025-01-27 15:38:18 -05:00
epenetandGitHub 2b939ce6ec Add translation checks for service exceptions (#131266)
* Add translation checks for service exceptions

* Adjust

* Remove invalid comment
2024-11-27 08:46:45 +01:00
J. Nick KostonandGitHub 53c486ccd1 Bump aiohttp to 3.11.0b3 (#129363) 2024-11-06 15:59:31 -06:00
Joost LekkerkerkerandGitHub 33d83e43de Update trigger validation message (#126749) 2024-09-25 15:33:03 +02:00
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 <[email protected]>
Co-authored-by: Erik <[email protected]>
2024-09-24 20:03:23 +02:00
J. Nick KostonandGitHub d8161c431f Add support for using an entityfilter to subscribe_entities (#124641)
* Add support for using an entityfilter to subscribe_entities

* filter init

* fix

* coverage
2024-08-27 11:17:05 +02:00
epenetandGitHub c2dc4ef215 Add missing hass type hint in component tests (w) (#124284) 2024-08-20 12:54:42 +02:00
J. Nick KostonandGitHub 108a54a4a8 Handle WebSocket client disconnect during prepare (#124173) 2024-08-19 15:28:05 -05:00
epenetandGitHub 5608301178 Add missing return type in test __init__ methods (#123932)
* Add missing return type in test __init__ methods

* Adjust
2024-08-14 16:48:52 +02:00
epenetandGitHub e33a7ecefa Improve type hints in websocket_api tests (#123922) 2024-08-14 15:54:00 +02:00
epenetandGitHub 7b08e625b4 Fix implicit-return in websocket_api tests (#122779) 2024-07-29 22:14:41 +02:00
J. Nick KostonandGitHub 1879db9f8f Revert to using call_soon for event triggers and state changed event trackers (#122735) 2024-07-29 11:45:39 +02:00
J. Nick KostonandGitHub 6bdc5be433 Bump aiohttp to 3.10.0b1 (#122409) 2024-07-23 12:10:22 -05:00
Marc MuellerandGitHub a6068dcdf2 Update import locations in tests (#122216) 2024-07-20 11:16:04 +02:00
Joost LekkerkerkerandGitHub b56c4a757c Bump ruff to 0.5.0 (#120749) 2024-06-28 15:23:21 +02:00