Namespaces | |
| const | |
| trigger | |
Classes | |
| class | CalendarEntity |
| class | CalendarEntityDescription |
| class | CalendarEvent |
| class | CalendarEventView |
| class | CalendarListView |
Functions | |
| dict[str, Any] | _api_event_dict_factory (Iterable[tuple[str, Any]] obj) |
| Callable[[dict[str, Any]], dict[str, Any]] | _as_local_timezone (*Any keys) |
| str|None | _empty_as_none (str|None value) |
| dict[str, str] | _event_dict_factory (Iterable[tuple[str, Any]] obj) |
| dict[str, str] | _get_api_date (datetime.datetime|datetime.date dt_or_d) |
| datetime.datetime | _get_datetime_local (datetime.datetime|datetime.date dt_or_d) |
| Callable[[dict[str, Any]], dict[str, Any]] | _has_consistent_timezone (*Any keys) |
| Callable[[dict[str, Any]], dict[str, Any]] | _has_min_duration (str start_key, str end_key, datetime.timedelta min_duration) |
| Callable[[dict[str, Any]], dict[str, Any]] | _has_same_type (*Any keys) |
| Callable[[dict[str, Any]], dict[str, Any]] | _has_timezone (*Any keys) |
| dict[str, JsonValueType] | _list_events_dict_factory (Iterable[tuple[str, Any]] obj) |
| str | _validate_rrule (Any value) |
| tuple[datetime.datetime|datetime.date, datetime.datetime|datetime.date] | _validate_timespan (dict[str, Any] values) |
| None | async_create_event (CalendarEntity entity, ServiceCall call) |
| ServiceResponse | async_get_events_service (CalendarEntity calendar, ServiceCall service_call) |
| bool | async_setup (HomeAssistant hass, ConfigType config) |
| bool | async_setup_entry (HomeAssistant hass, ConfigEntry entry) |
| bool | async_unload_entry (HomeAssistant hass, ConfigEntry entry) |
| tuple[str, datetime.timedelta] | extract_offset (str summary, str offset_prefix) |
| datetime.datetime | get_date (dict[str, Any] date) |
| None | handle_calendar_event_create (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_calendar_event_delete (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| None | handle_calendar_event_update (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg) |
| bool | is_offset_reached (datetime.datetime start, datetime.timedelta offset_time) |
Variables | |
| _LOGGER = logging.getLogger(__name__) | |
| CALENDAR_EVENT_SCHEMA | |
| CREATE_EVENT_SCHEMA | |
| string | CREATE_EVENT_SERVICE = "create_event" |
| string | ENTITY_ID_FORMAT = DOMAIN + ".{}" |
| Final | |
| MIN_EVENT_DURATION = datetime.timedelta(seconds=0) | |
| MIN_NEW_EVENT_DURATION = datetime.timedelta(seconds=1) | |
| PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA | |
| PLATFORM_SCHEMA_BASE = cv.PLATFORM_SCHEMA_BASE | |
| SCAN_INTERVAL = datetime.timedelta(seconds=60) | |
| dictionary | VALID_FREQS = {"DAILY", "WEEKLY", "MONTHLY", "YEARLY"} |
| WEBSOCKET_EVENT_SCHEMA | |
Support for Calendar event device sensors.
|
private |
Convert CalendarEvent dataclass items to the API format.
Definition at line 414 of file __init__.py.
|
private |
Convert all datetime values to the local timezone.
Definition at line 126 of file __init__.py.
|
private |
Convert any empty string values to None.
Definition at line 193 of file __init__.py.
|
private |
Convert CalendarEvent dataclass items to dictionary of attributes.
Definition at line 403 of file __init__.py.
|
private |
Convert a calendar event date/datetime to a datetime if needed.
Definition at line 447 of file __init__.py.
|
private |
Convert a calendar event date/datetime to a datetime if needed.
Definition at line 438 of file __init__.py.
|
private |
Verify that all datetime values have a consistent timezone.
Definition at line 108 of file __init__.py.
|
private |
Verify that the time span between start and end has a minimum duration.
Definition at line 139 of file __init__.py.
|
private |
Verify that all values are of the same type.
Definition at line 156 of file __init__.py.
|
private |
Assert that all datetime values have a timezone.
Definition at line 91 of file __init__.py.
|
private |
Convert CalendarEvent dataclass items to dictionary of attributes.
Definition at line 427 of file __init__.py.
|
private |
Validate a recurrence rule string.
Definition at line 169 of file __init__.py.
|
private |
Parse a create event service call and convert the args ofr a create event entity call. 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 `datetime` or `date` as a single `start` argument. It also handles the other service call variations like "in days" as well.
Definition at line 824 of file __init__.py.
| None homeassistant.components.calendar.async_create_event | ( | CalendarEntity | entity, |
| ServiceCall | call | ||
| ) |
Add a new event to calendar.
Definition at line 852 of file __init__.py.
| ServiceResponse homeassistant.components.calendar.async_get_events_service | ( | CalendarEntity | calendar, |
| ServiceCall | service_call | ||
| ) |
List events on a calendar during a time range.
Definition at line 864 of file __init__.py.
| bool homeassistant.components.calendar.async_setup | ( | HomeAssistant | hass, |
| ConfigType | config | ||
| ) |
Track states and offer events for calendars.
Definition at line 287 of file __init__.py.
| bool homeassistant.components.calendar.async_setup_entry | ( | HomeAssistant | hass, |
| ConfigEntry | entry | ||
| ) |
Set up a config entry.
Definition at line 320 of file __init__.py.
| bool homeassistant.components.calendar.async_unload_entry | ( | HomeAssistant | hass, |
| ConfigEntry | entry | ||
| ) |
Unload a config entry.
Definition at line 325 of file __init__.py.
| tuple[str, datetime.timedelta] homeassistant.components.calendar.extract_offset | ( | str | summary, |
| str | offset_prefix | ||
| ) |
Extract the offset from the event summary. Return a tuple with the updated event summary and offset time.
Definition at line 454 of file __init__.py.
| datetime.datetime homeassistant.components.calendar.get_date | ( | dict[str, Any] | date | ) |
Get the dateTime from date or dateTime as a local.
Definition at line 330 of file __init__.py.
| None homeassistant.components.calendar.handle_calendar_event_create | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle creation of a calendar event.
Definition at line 706 of file __init__.py.
| None homeassistant.components.calendar.handle_calendar_event_delete | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle delete of a calendar event.
Definition at line 745 of file __init__.py.
| None homeassistant.components.calendar.handle_calendar_event_update | ( | HomeAssistant | hass, |
| ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
Handle creation of a calendar event.
Definition at line 791 of file __init__.py.
| bool homeassistant.components.calendar.is_offset_reached | ( | datetime.datetime | start, |
| datetime.timedelta | offset_time | ||
| ) |
Have we reached the offset time specified in the event title.
Definition at line 477 of file __init__.py.
|
private |
Definition at line 73 of file __init__.py.
| homeassistant.components.calendar.CALENDAR_EVENT_SCHEMA |
Definition at line 255 of file __init__.py.
| homeassistant.components.calendar.CREATE_EVENT_SCHEMA |
Definition at line 199 of file __init__.py.
| string homeassistant.components.calendar.CREATE_EVENT_SERVICE = "create_event" |
Definition at line 198 of file __init__.py.
| string homeassistant.components.calendar.ENTITY_ID_FORMAT = DOMAIN + ".{}" |
Definition at line 75 of file __init__.py.
| homeassistant.components.calendar.Final |
Definition at line 271 of file __init__.py.
| homeassistant.components.calendar.MIN_EVENT_DURATION = datetime.timedelta(seconds=0) |
Definition at line 88 of file __init__.py.
| homeassistant.components.calendar.MIN_NEW_EVENT_DURATION = datetime.timedelta(seconds=1) |
Definition at line 84 of file __init__.py.
| homeassistant.components.calendar.PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA |
Definition at line 76 of file __init__.py.
| homeassistant.components.calendar.PLATFORM_SCHEMA_BASE = cv.PLATFORM_SCHEMA_BASE |
Definition at line 77 of file __init__.py.
| homeassistant.components.calendar.SCAN_INTERVAL = datetime.timedelta(seconds=60) |
Definition at line 78 of file __init__.py.
| dictionary homeassistant.components.calendar.VALID_FREQS = {"DAILY", "WEEKLY", "MONTHLY", "YEARLY"} |
Definition at line 81 of file __init__.py.
| homeassistant.components.calendar.WEBSOCKET_EVENT_SCHEMA |
Definition at line 237 of file __init__.py.