* Unused pylint suppression cleanups
* Remove outdated pylint bug references
* Add flake8-noqa config and note to run it every now and then
* Add codes to noqa's
* Unused noqa cleanups
* Add target to service call API
* Fix _async_call_service_step
* CONF_SERVICE_ENTITY_ID overrules target
* Move merging up before processing schema
* Restore services.yaml
* Add test
* Make input_datetime better handle timezones
* Improve test coverage
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Revert change to time format
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Limit concurrency of async_get_integration to avoid creating extra threads
Since async_get_integration is waiting on the disk most of the time
it would end up creating many new threads because the disk could
not deliver the data in time.
* pylint
* Fix exceptions.Unauthorized.permission type
* Use auth.permission consts more
* Auth typing improvements
* Helpers typing improvements
* Calculate self.state only once
* Add limit parameter to service call methods
* Break out prep part of async_call_from_config for use elsewhere
* Minor cleanup
* Fix improper use of asyncio.wait
* Fix state update
Call change listener immediately if its a callback
* Fix exception handling and logging
* Merge Script helper if_running/run_mode parameters into script_mode
- Remove background/blocking _ScriptRun subclasses which are no longer needed.
* Add queued script mode
* Disable timeout when making fully blocking script call
* Don't call change listener when restarting script
This makes restart mode behavior consistent with parallel & queue modes.
* Changes per review
- Call all script services (except script.turn_off) with no time limit.
- Fix handling of lock in _QueuedScriptRun and add comments to make it
clearer how this code works.
* Changes per review 2
- Move cancel shielding "up" from _ScriptRun.async_run to Script.async_run
(and apply to new style scripts only.) This makes sure Script class also
properly handles cancellation which it wasn't doing before.
- In _ScriptRun._async_call_service_step, instead of using script.turn_off
service, just cancel service call and let it handle the cancellation
accordingly.
* Fix bugs
- Add missing call to change listener in Script.async_run
in cancelled path.
- Cancel service task if ServiceRegistry.async_call cancelled.
* Revert last changes to ServiceRegistry.async_call
* Minor Script helper fixes & test improvements
- Don't log asyncio.CancelledError exceptions.
- Make change_listener a public attribute.
- Test overhaul
- Parametrize tests.
- Use common test functions.
- Mock timeout so tests don't need to wait for real time to elapse.
- Add common function for waiting for script action step.
* Use entity.async_request_call in service helper
* Clean up semaphore handling
* Address comments
* Simplify call entity service helper
* Fix stupid rflink test
* Add foundation for integration services
* Fix tests
* Remove async_get_platform
* Migrate Sonos partially to EntityPlatform.async_register_entity_service
* Tweaks
* Move other Sonos services to media player domain
* Move other Sonos services to media player domain
* Address comments
* Remove lock
* Fix typos
* Use make_entity_service_schema
* Add area extraction to async_extract_entities
Co-authored-by: Anders Melchiorsen <amelchio@nogoto.net>
* Add descriptive fields to script config
* Add script descriptions to hass.data["service_description_cache"]
* Import SERVICE_DESCRIPTION_CACHE
* Register script descriptions via async_set_service_schema
* Add scripts test for loading and reloading service descriptions
* Minor cleanup
* Clean up script schema