mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-22 03:49:18 +02:00
[Feature]: Bind Home Assistant sensors to storage locations (dryboxes/bins) (#2827)
This commit is contained in:
@@ -150,6 +150,9 @@ export function NotificationProviderCard({ provider, onEdit }: NotificationProvi
|
||||
{provider.on_ha_sensor_alert && (
|
||||
<span className="px-2 py-0.5 bg-indigo-100 dark:bg-indigo-500/20 text-indigo-700 dark:text-indigo-300 text-xs rounded">{t('notifications.haSensorAlert')}</span>
|
||||
)}
|
||||
{provider.on_location_ha_sensor_alert && (
|
||||
<span className="px-2 py-0.5 bg-indigo-100 dark:bg-indigo-500/20 text-indigo-700 dark:text-indigo-300 text-xs rounded">{t('notifications.locationHaSensorAlert')}</span>
|
||||
)}
|
||||
{provider.on_filament_low && (
|
||||
<span className="px-2 py-0.5 bg-cyan-100 dark:bg-cyan-500/20 text-cyan-700 dark:text-cyan-400 text-xs rounded">{t('notifications.lowFilament')}</span>
|
||||
)}
|
||||
@@ -425,6 +428,17 @@ export function NotificationProviderCard({ provider, onEdit }: NotificationProvi
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<p className="text-sm text-white">{t('notifications.locationHaSensorAlert')}</p>
|
||||
<p className="text-xs text-bambu-gray">{t('notifications.locationHaSensorAlertDescription')}</p>
|
||||
</div>
|
||||
<Toggle
|
||||
checked={provider.on_location_ha_sensor_alert ?? false}
|
||||
onChange={(checked) => updateMutation.mutate({ on_location_ha_sensor_alert: checked })}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between">
|
||||
<p className="text-sm text-white">{t('notifications.lowFilamentLabel')}</p>
|
||||
<Toggle
|
||||
|
||||
Reference in New Issue
Block a user