How touero/havacation works
Project Type and Purpose
• HaVacation is a custom Home-Assistant integration that provides sensors for workdays and vacations based on the Chinese calendar.
• The integration supplies 1–3 sensors (as described in the README) that expose attributes like “Is workday”, “Is vacation”, and “UpdatedAt”.
• It leverages Home-Assistant’s custom component architecture and integrates with Home-Assistant’s configuration flow and sensor ecosystem.
File Structure and Main Components
• custom_components/ha_vacation:
• __init__.py: Initializes the integration.
• config_flow.py: Manages the Home-Assistant UI integration setup (the configuration flow).
• sensor.py: Implements one or more sensor entities that provide the workday/vacation data.
• ha_vacation_date.py: Likely contains the logic for computing dates based on the Chinese calendar.
• constants.py / const.py: Define key constants used across the integration.
• manifest.json: Informs Home-Assistant about the integration, its dependencies, and configuration requirements.
• tests: Contains unit and integration tests verifying the integration’s functionality.
• Additional files (requirements.txt, setup.cfg, etc.) support dependency management and package configuration.
• .github and related files: Define CI workflows for testing, linting, releases, etc.