"""Home Assistant service provider implementation."""

from notify_bridge_core.providers.base import ServiceProviderType
from notify_bridge_core.templates.variables import registry

from .client import (
    HomeAssistantApiError,
    HomeAssistantAuthError,
    HomeAssistantWSClient,
    _redact as redact_ha_message,
)
from .event_parser import parse_event
from .provider import (
    DEFAULT_HA_EVENT_TYPES,
    HOME_ASSISTANT_VARIABLES,
    HomeAssistantServiceProvider,
)

# Register HA variables in the global registry — same pattern as the other
# providers in this package.
registry.register_provider_variables(
    ServiceProviderType.HOME_ASSISTANT, HOME_ASSISTANT_VARIABLES,
)

__all__ = [
    "DEFAULT_HA_EVENT_TYPES",
    "HOME_ASSISTANT_VARIABLES",
    "HomeAssistantApiError",
    "HomeAssistantAuthError",
    "HomeAssistantServiceProvider",
    "HomeAssistantWSClient",
    "parse_event",
    "redact_ha_message",
]
