Commit Graph

1298 Commits (b81f15725fe359285e1c4257ab5ac3870f65ad52)

Author SHA1 Message Date
Erik Montnemery 123f14dd6c
Attach correct platform config in check_config warnings and errors (#103633) 2023-11-09 00:06:04 +01:00
Erik Montnemery d913508607
Allow removing an entity more than once (#102904) 2023-11-08 12:50:40 +01:00
Erik Montnemery cc5eda76d3
Humanize core config errors in check_config helper (#103635) 2023-11-08 10:15:27 +01:00
Erik Montnemery 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 Benecke ae1117bc74
Fix failing entity reuse test (#103342)
* Fix failing entity reuse test

* One more test
2023-11-03 23:19:37 +01:00
Erik Montnemery 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 Bottein 89a9e6c6e8
Add trigger selector for blueprint (#103050) 2023-11-03 09:11:49 +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
Erik Montnemery 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 Montnemery 6f515c06a2
Add test for check_config helper (#102898) 2023-10-28 14:52:20 +02:00
Erik Montnemery 294f565bad
Allow missing components in safe mode (#102888) 2023-10-27 12:25:27 +02:00
Erik Montnemery b83ada8c19
Use real devices in automation and script tests (#102785) 2023-10-25 16:09:39 +02:00
Raman Gupta 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 Koston f91583a0fc
Add support for family to aiohttp session helper (#102702) 2023-10-24 18:40:39 -05:00
Erik Montnemery c481fdb7d0
Rename safe mode to recovery mode (#102580) 2023-10-23 20:33:08 +02:00
Erik Montnemery 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 Koston 433c022687
Save previous unique id in entity registry when it changes (#102093) 2023-10-16 21:26:19 -10:00
J. Nick Koston e5ebdf7ad4
Remove implict name check from Entity base class (#101905) 2023-10-15 23:40:43 +02:00
G Johansson 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
Robert Resch 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 Walle 1b11062b27
Improved debugging for "Failed to set state" (#101657) 2023-10-08 19:40:42 +02:00
Joost Lekkerkerker faea3b1634
Abort config flow when invalid token is received (#101642) 2023-10-08 13:32:35 +02:00
Erik Montnemery 20188181f7
Fix spelling in sensor test (#101520) 2023-10-06 11:51:08 +02:00
Erik Montnemery 3478666973
Use loader.async_suggest_report_issue in deprecation helper (#101393) 2023-10-06 09:51:08 +02:00
Erik Montnemery dce5099d92
Use loader.async_suggest_report_issue in frame helper (#101461) 2023-10-05 19:52:26 +02:00
Erik Montnemery 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 Montnemery 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 Montnemery 2627abb9ef
Improve test coverage of deprecation helper (#101335) 2023-10-03 20:57:24 +02:00
Erik Montnemery ab2de18f8f
Refactor frame.get_integration_frame (#101322) 2023-10-03 19:21:27 +02:00
Marc Mueller 100b6fd06f
Fix flaky lru_cache test (#101252) 2023-10-02 13:52:56 +02:00
Ville Skyttä f4bf8fa8f1
Catch HTML case insensitively in "no HTML" config validation (#101181) 2023-10-01 16:19:24 +02:00
Erik Montnemery 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 Mueller c59404b5bc
Fix additional test cases for Python 3.12 (#101006) 2023-09-27 17:19:20 +02:00
Erik Montnemery ab060b86d1
Remove async_process_integration_platform_for_component (#100680) 2023-09-21 17:06:41 +02:00
Erik Montnemery 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 Koston 042776ebb8
Cache entity properties that are never expected to change in the base class (#95315) 2023-09-14 17:48:48 -05:00
Erik Montnemery bbcbb2e322
Improve Entity._suggest_report_issue (#100204) 2023-09-12 21:07:32 +02:00
Erik Montnemery 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 Montnemery 1654ef7759
Make WS command render_template not give up if initial render raises (#99808) 2023-09-08 21:02:06 +02:00
J. Nick Koston 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 Montnemery 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 Koston 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
Erik Montnemery 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
Erik Montnemery 9dac6a2948
Use loop.time in DataUpdateCoordinator (#98937) 2023-08-28 10:16:34 -05:00
Ville Skyttä 6399d74c15
Remove unnnecessary pylint configs from core (#98704) 2023-08-22 23:12:12 +02:00
Ville Skyttä 3094991236
Upgrade ruff to 0.0.285 (#98647) 2023-08-19 08:17:17 -04:00
Erik Montnemery 7fcc2dd44e
Make the check_config script open issue_registry read only (#98545)
* Don't blow up if validators can't access the issue registry

* Make the check_config script open issue_registry read only

* Update tests/helpers/test_issue_registry.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-08-18 20:15:00 +02:00
Marc Mueller a9ade1f84d
Use asyncio.timeout [core] (#98447) 2023-08-15 08:36:05 -05:00
Erik Montnemery 97f3199d6d
Do not add entities with invalid device info (#98150) 2023-08-11 13:14:47 +02:00
Franck Nijhof 296c27859e
Fix issue registry sending unneeded update events (#98230) 2023-08-10 21:57:42 -04:00