Align frontend device types with backend canonical list

Replaces the old frontend-only `router` type and adds the full set used
by the backend: network_appliance, home_security, home_appliance, watch,
pc, gaming_console. Adds an `apiName` getter to map camelCase enum values
to the snake_case strings the API expects. Updates the unknown device icon
to a question mark.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-05-28 16:44:34 -04:00
co-authored by Claude Sonnet 4.6
parent 23b8858259
commit e28eb349ba
4 changed files with 42 additions and 10 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ Future<void> showRegisterDeviceDialog(
await BackendAPI.instance.registerDevice(
device.macAddress,
owner,
deviceType.name,
deviceType.apiName,
);
if (!context.mounted) return;
UISnackbars.showSuccess(context, 'Device registered');