mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Adjust Calendar doc strings and comments (#101655)
This commit is contained in:
parent
7c85d84133
commit
5087f0056c
@ -813,7 +813,7 @@ def _validate_timespan(
|
||||
|
||||
This converts the input service arguments into a `start` and `end` date or date time. This
|
||||
exists because service calls use `start_date` and `start_date_time` whereas the
|
||||
normal entity methods can take either a `datetim` or `date` as a single `start` argument.
|
||||
normal entity methods can take either a `datetime` or `date` as a single `start` argument.
|
||||
It also handles the other service call variations like "in days" as well.
|
||||
"""
|
||||
|
||||
@ -849,7 +849,7 @@ async def async_create_event(entity: CalendarEntity, call: ServiceCall) -> None:
|
||||
async def async_list_events_service(
|
||||
calendar: CalendarEntity, service_call: ServiceCall
|
||||
) -> ServiceResponse:
|
||||
"""List events on a calendar during a time drange."""
|
||||
"""List events on a calendar during a time range."""
|
||||
start = service_call.data.get(EVENT_START_DATETIME, dt_util.now())
|
||||
if EVENT_DURATION in service_call.data:
|
||||
end = start + service_call.data[EVENT_DURATION]
|
||||
|
@ -118,7 +118,7 @@ def queued_event_fetcher(
|
||||
offset_timespan = timespan.with_offset(-1 * offset)
|
||||
active_events = await fetcher(offset_timespan)
|
||||
|
||||
# Determine the trigger eligibilty of events during this time span.
|
||||
# Determine the trigger eligibility of events during this time span.
|
||||
# Example: For an EVENT_END trigger the event may start during this
|
||||
# time span, but need to be triggered later when the end happens.
|
||||
results = []
|
||||
@ -130,7 +130,7 @@ def queued_event_fetcher(
|
||||
results.append(QueuedCalendarEvent(trigger_time + offset, event))
|
||||
|
||||
_LOGGER.debug(
|
||||
"Scan events @ %s%s found %s eligble of %s active",
|
||||
"Scan events @ %s%s found %s eligible of %s active",
|
||||
offset_timespan,
|
||||
f" (offset={offset})" if offset else "",
|
||||
len(results),
|
||||
|
Loading…
x
Reference in New Issue
Block a user