Exemple #1
0
def get_calendar_info(calendar):
    """Convert data from Google into DEVICE_SCHEMA."""
    calendar_info = DEVICE_SCHEMA({
        CONF_CAL_ID:
        calendar["id"],
        CONF_ENTITIES: [{
            CONF_TRACK: calendar["track"],
            CONF_NAME: calendar["summary"],
            CONF_DEVICE_ID: slugify(calendar["summary"]),
        }],
    })
    return calendar_info
Exemple #2
0
def get_calendar_info(calendar):
    """Convert data from Google into DEVICE_SCHEMA."""
    calendar_info = DEVICE_SCHEMA({
        CONF_CAL_ID:
        calendar["id"],
        CONF_ENTITIES: [{
            CONF_TRACK:
            calendar["track"],
            CONF_NAME:
            calendar["summary"],
            CONF_DEVICE_ID:
            slugify(calendar["summary"]),
            CONF_IGNORE_AVAILABILITY:
            calendar.get("ignore_availability", True),
        }],
    })
    return calendar_info