mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-10 10:56:28 +00:00
Add path to exceptions in IQS action-exceptions.md (#2468)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
parent
b385a5fec9
commit
23d946d7fd
@ -21,7 +21,9 @@ When the problem is caused by an error in the service action itself (for example
|
||||
In this example, we show a function that is registered as a service action in Home Assistant.
|
||||
If the input is incorrect (when the end date is before the start date), a `ServiceValidationError` is raised, and if we can't reach the service, we raise a `HomeAssistantError`.
|
||||
|
||||
```python {6,10} showLineNumbers
|
||||
```python {8,12} showLineNumbers
|
||||
from homeassistant.exceptions import HomeAssistantError, ServiceValidationError
|
||||
|
||||
async def async_set_schedule(call: ServiceCall) -> ServiceResponse:
|
||||
"""Set the schedule for a day."""
|
||||
start_date = call.data[ATTR_START_DATE]
|
||||
|
Loading…
x
Reference in New Issue
Block a user