* Add update support for calendars and implement in local calendar * Fix supported feature for update calendar * Increase test coverage for websocket error cases * Improve test coverage for update failure cases * Improve test coverage by sharing code between update and create * Update homeassistant/components/calendar/__init__.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
26 lines
519 B
Python
26 lines
519 B
Python
"""Constants for calendar components."""
|
|
|
|
from enum import IntEnum
|
|
|
|
CONF_EVENT = "event"
|
|
|
|
|
|
class CalendarEntityFeature(IntEnum):
|
|
"""Supported features of the calendar entity."""
|
|
|
|
CREATE_EVENT = 1
|
|
DELETE_EVENT = 2
|
|
UPDATE_EVENT = 4
|
|
|
|
|
|
# rfc5545 fields
|
|
EVENT_UID = "uid"
|
|
EVENT_START = "dtstart"
|
|
EVENT_END = "dtend"
|
|
EVENT_SUMMARY = "summary"
|
|
EVENT_DESCRIPTION = "description"
|
|
EVENT_LOCATION = "location"
|
|
EVENT_RECURRENCE_ID = "recurrence_id"
|
|
EVENT_RECURRENCE_RANGE = "recurrence_range"
|
|
EVENT_RRULE = "rrule"
|