How owie2711/home-assistant-desktop-app-2 works
Home Assistant Desktop is a native Windows shell for the Home Assistant dashboard. On launch it loads settings, then either guides first-run server setup or initializes WebView2 against the active server; users can navigate, switch servers, and manage preferences. Settings and server profiles persist locally, while separate services handle tray access, window behavior, and Windows startup. The graph preserves README-documented capabilities, but unsampled implementation details are not treated as verified call paths.
Main entry points: App.xaml.cs Application startup · SettingsService.cs Settings persistence · WebViewService.cs WebView2 lifecycle · SettingsViewModel.cs Settings view model
Components 18
Application runtime
- Application startup
App.xaml.cs - Main window
Views/MainWindow.xaml.cs - Main view model
ViewModels/MainViewModel.cs - Single instance guard
Services/SingleInstanceService.cs - File logging
Services/FileLogger.cs
Dashboard access
- WebView2 lifecycle
Services/WebViewService.cs
Configuration
- Settings window
Views/SettingsWindow.xaml.cs - Settings view model
ViewModels/SettingsViewModel.cs - Server profiles
Services/ServerManager.cs - Server profile
Models/ServerProfile.cs - Settings persistence
Services/SettingsService.cs - Application settings
Models/AppSettings.cs
Windows integration
- Window behavior
Services/WindowService.cs - System tray
Services/TrayService.cs - Windows startup
Services/StartupService.cs
Other components
- Desktop user
- Home Assistant server
- Windows Registry
Connections 43
- Desktop user → Main window: opens
README.md - Application startup → Single instance guard: guards launch
App.xaml.cs - Application startup → Settings persistence: loads settings
App.xaml.cs - Application startup → Server profiles: resolves service
App.xaml.cs - Application startup → WebView2 lifecycle: resolves service
App.xaml.cs - Application startup → Window behavior: resolves service
App.xaml.cs - Application startup → System tray: resolves service
App.xaml.cs - Application startup → Windows startup: syncs startup
App.xaml.cs - Application startup → File logging: configures provider
App.xaml.cs - Application startup → Main window: creates window
App.xaml.cs - Main window → Main view model: binds view model
Views/MainWindow.xaml.cs - Main window → WebView2 lifecycle: attaches view
Views/MainWindow.xaml.cs - Main window → Window behavior: attaches window
Views/MainWindow.xaml.cs - Main window → Settings window: opens settings
Views/MainWindow.xaml.cs - Settings window → Settings view model: uses view model
Views/SettingsWindow.xaml.cs - Main view model → WebView2 lifecycle: initializes and switches
ViewModels/MainViewModel.cs - Main view model → Server profiles: selects active profile
ViewModels/MainViewModel.cs - Main view model → Window behavior: controls fullscreen
ViewModels/MainViewModel.cs - Main view model → System tray: refreshes menu
ViewModels/MainViewModel.cs - Main view model → Settings view model: requests settings
Views/MainWindow.xaml.cs - WebView2 lifecycle → Home Assistant server: navigates and probes
Services/WebViewService.cs - WebView2 lifecycle → Server profiles: gets active profile
Services/WebViewService.cs - WebView2 lifecycle → Settings persistence: reads and saves zoom
Services/WebViewService.cs - Settings view model → Server profiles: manages profiles
ViewModels/SettingsViewModel.cs - Settings view model → Settings persistence: updates preferences
ViewModels/SettingsViewModel.cs - Settings view model → Windows startup: sets auto-start
ViewModels/SettingsViewModel.cs - Settings view model → Window behavior: sets fullscreen
ViewModels/SettingsViewModel.cs - Settings view model → Home Assistant server: tests connection
ViewModels/SettingsViewModel.cs - Server profiles → Settings persistence: updates server list
Services/ServerManager.cs - Server profiles → Server profile: manages profiles
Services/ServerManager.cs - Settings persistence → Application settings: serializes settings
Services/SettingsService.cs - Settings persistence → Application settings: contains active profile
Models/AppSettings.cs - System tray → Settings persistence: reads server list
Services/TrayService.cs - System tray → Main window: requests open or settings
Views/MainWindow.xaml.cs - Window behavior → Settings persistence: reads and saves window state
Services/WindowService.cs - Windows startup → Windows Registry: reads and writes
Services/StartupService.cs - Desktop user → System tray: uses tray menu
README.md - Desktop user → Settings view model: configures servers
README.md - Desktop user → Window behavior: toggles fullscreen
README.md - Desktop user → Windows startup: enables auto-start
README.md - Settings persistence → Application settings: persists locally
README.md - WebView2 lifecycle → Home Assistant server: renders dashboard
README.md - WebView2 lifecycle → Server profiles: isolates browser data
README.md