Commit Graph
1305 Commits
Author SHA1 Message Date
Erik MontnemeryandGitHub dd7670cacf Improve errors for component configuration with missing keys (#103982) 2023-11-15 10:47:05 +01:00
Erik MontnemeryandGitHub 94a2087ba0 Improve formatting of config validation errors (#103957)
* Improve formatting of config validation errors

* Address review comments
2023-11-14 12:48:45 +01:00
Erik MontnemeryandGitHub dedd3418a1 Improve print of line numbers when there are configuration errors (#103216)
* Improve print of line numbers when there are configuration errors

* Update alarm_control_panel test
2023-11-14 08:21:36 +01:00
Erik MontnemeryandGitHub 07af073735 Remove trailing space from configuration error messages (#103909)
* Remove trailing space from configuration error messages

* Update test
2023-11-13 15:19:37 +01:00
Erik MontnemeryandGitHub 01b3e0c49e Remove useless code from entity helper tests (#103854) 2023-11-12 18:55:34 +01:00
Allen PorterandGitHub 787fb3b954 Improve OAuth error handling in configuration flows (#103157)
* Improve OAuth error handling in configuration flows

* Update strings for all integrations that use oauth2 config flow

* Remove invalid_auth strings

* Revert change to release

* Revert close change in aiohttp mock
2023-11-11 11:02:51 +01:00
Franck NijhofandGitHub 70ad5ab3e4 Update helper tests to use device & entity registry fixtures (#103710) 2023-11-10 09:32:19 +01:00
Erik MontnemeryandGitHub 123f14dd6c Attach correct platform config in check_config warnings and errors (#103633) 2023-11-09 00:06:04 +01:00
Erik MontnemeryandGitHub d913508607 Allow removing an entity more than once (#102904) 2023-11-08 12:50:40 +01:00
Erik MontnemeryandGitHub cc5eda76d3 Humanize core config errors in check_config helper (#103635) 2023-11-08 10:15:27 +01:00
Erik MontnemeryandGitHub 3ba8a82243 Differentiate between warnings and errors in check_config helper (#102902)
* Differentiate between warnings and errors in check_config helper

* Update tests

* Treat configuration errors in frontend and its dependencies as errors

* Improve test coverage

* Address review comments

* Improve test coverage

* Improve test coverage

* Address review comments

* Add comment
2023-11-05 03:08:04 +01:00
Jan-Philipp BeneckeandGitHub ae1117bc74 Fix failing entity reuse test (#103342)
* Fix failing entity reuse test

* One more test
2023-11-03 23:19:37 +01:00
Erik MontnemeryandGitHub 0ea0a1ed06 Prevent accidentally reusing an entity object (#102911)
* Prevent accidentally reusing an entity object

* Fix group reload service

* Revert "Fix group reload service"

* Improve test

* Add tests aserting entity can't be reused
2023-11-03 21:01:38 +01:00
Paul BotteinandGitHub 89a9e6c6e8 Add trigger selector for blueprint (#103050) 2023-11-03 09:11:49 +01:00
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
Erik MontnemeryandGitHub 03d3a87f23 Small cleanup of legacy groups (#102918)
* Small cleanup of legacy groups

* Update tests which create groups
2023-10-28 17:16:41 +02:00
Erik MontnemeryandGitHub 6f515c06a2 Add test for check_config helper (#102898) 2023-10-28 14:52:20 +02:00
Erik MontnemeryandGitHub 294f565bad Allow missing components in safe mode (#102888) 2023-10-27 12:25:27 +02:00
Erik MontnemeryandGitHub b83ada8c19 Use real devices in automation and script tests (#102785) 2023-10-25 16:09:39 +02:00
35d18a9a3e Add tests for types and functions for type conversions in templates (#100807)
Co-authored-by: Robert Resch <robert@resch.dev>
2023-10-25 13:20:34 +02:00
J. Nick KostonandGitHub f91583a0fc Add support for family to aiohttp session helper (#102702) 2023-10-24 18:40:39 -05:00
Erik MontnemeryandGitHub c481fdb7d0 Rename safe mode to recovery mode (#102580) 2023-10-23 20:33:08 +02:00
1621310ba7 Add serial_number to device registry entries (#102334)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-10-22 15:14:44 +02:00
J. Nick KostonandGitHub 433c022687 Save previous unique id in entity registry when it changes (#102093) 2023-10-16 21:26:19 -10:00
J. Nick KostonandGitHub e5ebdf7ad4 Remove implict name check from Entity base class (#101905) 2023-10-15 23:40:43 +02:00
dc29190564 CountrySelector (#100963)
* CountrySelector

* rename

* remove multiple for now

* Add no_sort

* Update homeassistant/helpers/selector.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-10-12 16:44:30 +02:00
b932c67eb7 Delete optional schema keys, when they are not present (#101755)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-10-10 21:08:54 +02:00
Nicolas van de WalleandGitHub 1b11062b27 Improved debugging for "Failed to set state" (#101657) 2023-10-08 19:40:42 +02:00
Joost LekkerkerkerandGitHub faea3b1634 Abort config flow when invalid token is received (#101642) 2023-10-08 13:32:35 +02:00
Erik MontnemeryandGitHub 20188181f7 Fix spelling in sensor test (#101520) 2023-10-06 11:51:08 +02:00
Erik MontnemeryandGitHub 3478666973 Use loader.async_suggest_report_issue in deprecation helper (#101393) 2023-10-06 09:51:08 +02:00
Erik MontnemeryandGitHub dce5099d92 Use loader.async_suggest_report_issue in frame helper (#101461) 2023-10-05 19:52:26 +02:00
Erik MontnemeryandGitHub 7e39acda37 Minor improvement of frame helper (#101387)
* Minor improvement of frame helper

* Add new custom integration for testing

* Make IntegrationFrame kw_only
2023-10-04 21:43:00 +02:00
Erik MontnemeryandGitHub 17779c5f0c Add loader.async_suggest_report_issue and loader.async_get_issue_tracker (#101336)
* Add loader.async_suggest_report_issue and loader.async_get_issue_tracker

* Update tests

* Add tests

* Address review comments

* Address review comments
2023-10-04 13:40:33 +02:00
Erik MontnemeryandGitHub 2627abb9ef Improve test coverage of deprecation helper (#101335) 2023-10-03 20:57:24 +02:00
Erik MontnemeryandGitHub ab2de18f8f Refactor frame.get_integration_frame (#101322) 2023-10-03 19:21:27 +02:00
Marc MuellerandGitHub 100b6fd06f Fix flaky lru_cache test (#101252) 2023-10-02 13:52:56 +02:00
Ville SkyttäandGitHub f4bf8fa8f1 Catch HTML case insensitively in "no HTML" config validation (#101181) 2023-10-01 16:19:24 +02:00
Erik MontnemeryandGitHub 47ecce4873 Allow deleting entity entries from entity_registry.async_migrate_entries (#101094)
* Allow deleting entity entries from entity_registry.async_migrate_entries

* Explicitly return None in tests
2023-09-30 10:23:10 +02:00
Marc MuellerandGitHub c59404b5bc Fix additional test cases for Python 3.12 (#101006) 2023-09-27 17:19:20 +02:00
Erik MontnemeryandGitHub ab060b86d1 Remove async_process_integration_platform_for_component (#100680) 2023-09-21 17:06:41 +02:00
Erik MontnemeryandGitHub d1afcd773f Revert "Cache entity properties that are never expected to change in the base class" (#100422)
Revert "Cache entity properties that are never expected to change in the base class (#95315)"

This reverts commit 042776ebb8.
2023-09-15 11:25:24 +02:00
J. Nick KostonandGitHub 042776ebb8 Cache entity properties that are never expected to change in the base class (#95315) 2023-09-14 17:48:48 -05:00
Erik MontnemeryandGitHub bbcbb2e322 Improve Entity._suggest_report_issue (#100204) 2023-09-12 21:07:32 +02:00
Erik MontnemeryandGitHub 51576b7214 Improve typing of entity.entity_sources (#99407)
* Improve typing of entity.entity_sources

* Calculate entity info source when generating WS response

* Adjust typing

* Update tests
2023-09-12 20:41:26 +02:00
Erik MontnemeryandGitHub 1654ef7759 Make WS command render_template not give up if initial render raises (#99808) 2023-09-08 21:02:06 +02:00
J. Nick KostonandGitHub 034fabe188 Use loop time to set context (#99701)
* Use loop time to set context

loop time is faster than utcnow, and since its only used internally it can
be switched without a breaking change

* fix mocking
2023-09-06 11:04:49 +02:00
Erik MontnemeryandGitHub 48f7924e9e Allow specifying a custom log function for template render (#99572)
* Allow specifying a custom log function for template render

* Bypass template cache when reporting errors + fix tests

* Send errors as events

* Fix logic for creating new TemplateEnvironment

* Add strict mode back

* Only send error events if report_errors is True

* Force test of websocket_api only

* Debug test

* Run pytest with higher verbosity

* Timeout after 1 minute, enable syslog output

* Adjust timeout

* Add debug logs

* Fix unsafe call to WebSocketHandler._send_message

* Remove debug code

* Improve test coverage

* Revert accidental change

* Include severity in error events

* Remove redundant information from error events
2023-09-06 10:03:35 +02:00
J. Nick KostonandGitHub a2dae60170 Refactor dispatcher to reduce run time and memory overhead (#99676)
* Fix memory leak in dispatcher removal

When we removed the last job/callable from the dict for the
signal we did not remove the dict for the signal which meant
it leaked

* comment

* cleanup a bit more
2023-09-05 21:18:27 -04:00
709ce7e0af Set state of entity with invalid state to unknown (#99452)
* Set state of entity with invalid state to unknown

* Add test

* Apply suggestions from code review

Co-authored-by: Robert Resch <robert@resch.dev>

* Update test_entity.py

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2023-09-04 14:09:51 +02:00