* Initial commit Workday Config Flow * Add tests * Remove day_to_string * new entity name, new depr. version, clean * Use repairs for depr. warning * Fix issue_registry moved * tweaks * hassfest * Fix CI * FlowResultType * breaking version * remove translation * Fixes * naming * duplicates * abort entries match * add_suggested_values_to_schema * various * validate country * abort_entries_match in option flow * Remove country test * remove country not exist string * docstring exceptions * easier * break version * unneeded check * slim tests * Fix import test * Fix province in abort_match * review comments * Fix import province * Add review fixes * fix reviews * Review fixes
28 lines
771 B
Python
28 lines
771 B
Python
"""Add constants for Workday integration."""
|
|
from __future__ import annotations
|
|
|
|
import logging
|
|
|
|
from homeassistant.const import WEEKDAYS, Platform
|
|
|
|
LOGGER = logging.getLogger(__package__)
|
|
|
|
ALLOWED_DAYS = WEEKDAYS + ["holiday"]
|
|
|
|
DOMAIN = "workday"
|
|
PLATFORMS = [Platform.BINARY_SENSOR]
|
|
|
|
CONF_COUNTRY = "country"
|
|
CONF_PROVINCE = "province"
|
|
CONF_WORKDAYS = "workdays"
|
|
CONF_EXCLUDES = "excludes"
|
|
CONF_OFFSET = "days_offset"
|
|
CONF_ADD_HOLIDAYS = "add_holidays"
|
|
CONF_REMOVE_HOLIDAYS = "remove_holidays"
|
|
|
|
# By default, Monday - Friday are workdays
|
|
DEFAULT_WORKDAYS = ["mon", "tue", "wed", "thu", "fri"]
|
|
# By default, public holidays, Saturdays and Sundays are excluded from workdays
|
|
DEFAULT_EXCLUDES = ["sat", "sun", "holiday"]
|
|
DEFAULT_NAME = "Workday Sensor"
|
|
DEFAULT_OFFSET = 0
|