Add Home Assistant as notification provider (#656)

Sends persistent notifications to the HA dashboard using the existing
  HA connection from Settings. Zero config — just select "Home Assistant"
  as provider type. Users can forward notifications to mobile via HA
  automations.
This commit is contained in:
maziggy
2026-03-10 10:10:14 +01:00
parent 0fe5837d2c
commit f28421d1ae
88 changed files with 1015 additions and 13 deletions
@@ -12,7 +12,7 @@ interface AddNotificationModalProps {
onClose: () => void;
}
const PROVIDER_VALUES: ProviderType[] = ['email', 'telegram', 'discord', 'ntfy', 'pushover', 'callmebot', 'webhook'];
const PROVIDER_VALUES: ProviderType[] = ['email', 'telegram', 'discord', 'ntfy', 'pushover', 'callmebot', 'webhook', 'homeassistant'];
export function AddNotificationModal({ provider, onClose }: AddNotificationModalProps) {
const { t } = useTranslation();
@@ -210,6 +210,8 @@ export function AddNotificationModal({ provider, onClose }: AddNotificationModal
{ key: 'field_title', label: 'Title Field Name', placeholder: 'title', type: 'text', required: false, showIf: (cfg: Record<string, string>) => cfg.payload_format !== 'slack' },
{ key: 'field_message', label: 'Message Field Name', placeholder: 'message', type: 'text', required: false, showIf: (cfg: Record<string, string>) => cfg.payload_format !== 'slack' },
];
case 'homeassistant':
return [];
default:
return [];
}
@@ -337,7 +339,7 @@ export function AddNotificationModal({ provider, onClose }: AddNotificationModal
setTestResult(null);
testMutation.mutate();
}}
disabled={testMutation.isPending || !config[getRequiredFields(providerType)[0]?.key]}
disabled={testMutation.isPending || (getRequiredFields(providerType).length > 0 && !config[getRequiredFields(providerType)[0]?.key])}
className="flex-1"
>
{testMutation.isPending ? (