hass-core/homeassistant/components/google/const.py
Allen Porter 9d933e732b
Remove google scan_for_calendars service and simplify platform setup (#73010)
* Remove google scan_for_calendars service and simplify platform setup

* Update invalid calendar yaml test
2022-06-03 21:56:53 -07:00

31 lines
758 B
Python

"""Constants for google integration."""
from __future__ import annotations
from enum import Enum
DOMAIN = "google"
DEVICE_AUTH_IMPL = "device_auth"
CONF_CALENDAR_ACCESS = "calendar_access"
DATA_CALENDARS = "calendars"
DATA_SERVICE = "service"
DATA_CONFIG = "config"
class FeatureAccess(Enum):
"""Class to represent different access scopes."""
read_only = "https://www.googleapis.com/auth/calendar.readonly"
read_write = "https://www.googleapis.com/auth/calendar"
def __init__(self, scope: str) -> None:
"""Init instance."""
self._scope = scope
@property
def scope(self) -> str:
"""Google calendar scope for the feature."""
return self._scope
DEFAULT_FEATURE_ACCESS = FeatureAccess.read_write