namespace Evergreen.Health.Application.Health.Models; public enum HealthDeviceCategory { EnvironmentControl, EnvironmentSensor, Sleep, BodyComposition, Fragrance, Lighting, Media, Other, Climate, Curtain, SleepMonitoring, Outlet } public sealed class HomeAssistantEntityOutput { public string EntityId { get; set; } = string.Empty; public string Domain { get; set; } = string.Empty; public string Name { get; set; } = string.Empty; public string State { get; set; } = string.Empty; public bool Available { get; set; } public string? Unit { get; set; } public Dictionary? Attributes { get; set; } } public sealed class HomeAssistantDiscoveredDeviceOutput { public string ModuleKey { get; set; } = string.Empty; public string DeviceId { get; set; } = string.Empty; public string Name { get; set; } = string.Empty; public string Manufacturer { get; set; } = string.Empty; public string Model { get; set; } = string.Empty; public string? AreaName { get; set; } public string Category { get; set; } = nameof(HealthDeviceCategory.Other); public bool Online { get; set; } public string? PrimaryControlEntityId { get; set; } public string? DefaultLightEffect { get; set; } public List Entities { get; set; } = []; public Dictionary Metrics { get; set; } = []; } public sealed class HomeAssistantSummaryOutput { public int TotalDevices { get; set; } public int OnlineDevices { get; set; } public int OfflineDevices { get; set; } public int TotalEntities { get; set; } public int AvailableEntities { get; set; } } public sealed class HomeAssistantSceneDevicesSummaryOutput { public int Total { get; set; } = 4; public int Available { get; set; } } public sealed class HomeAssistantEnvironmentOutput { public double? Temperature { get; set; } public double? Humidity { get; set; } public double? Pm25 { get; set; } public double? Pm10 { get; set; } public double? Co2 { get; set; } public double? Hcho { get; set; } public double? Tvoc { get; set; } } public sealed class HomeAssistantStatusOutput { public bool Connected { get; set; } public string Message { get; set; } = string.Empty; public DateTimeOffset CheckedAt { get; set; } = DateTimeOffset.Now; public HomeAssistantSummaryOutput Summary { get; set; } = new(); public List Devices { get; set; } = []; public HomeAssistantSceneDevicesSummaryOutput SceneDevices { get; set; } = new(); public HomeAssistantEnvironmentOutput Environment { get; set; } = new(); public List ScenePresets { get; set; } = []; public Dictionary ControlParameters { get; set; } = []; } public sealed class HomeAssistantParameterStateOutput { public string EntityId { get; set; } = string.Empty; public string State { get; set; } = string.Empty; public bool Available { get; set; } public Dictionary? Attributes { get; set; } } public sealed class HomeAssistantScenePresetItem { public string DeviceName { get; set; } = string.Empty; public string Category { get; set; } = string.Empty; public string EntityId { get; set; } = string.Empty; public bool Available { get; set; } public string AvailabilityMessage { get; set; } = string.Empty; public string Action { get; set; } = string.Empty; public string Detail { get; set; } = string.Empty; public Dictionary Parameters { get; set; } = []; } public sealed class HomeAssistantDeviceSwitchInput { public string DeviceId { get; set; } = string.Empty; public string? EntityId { get; set; } public bool TurnOn { get; set; } } public sealed class HomeAssistantDeviceSwitchOutput { public bool Success { get; set; } public string DeviceId { get; set; } = string.Empty; public string EntityId { get; set; } = string.Empty; public string State { get; set; } = string.Empty; public bool? IsMuted { get; set; } public string Message { get; set; } = string.Empty; } public sealed class HomeAssistantLightTransitionOutput { public string EntityId { get; set; } = string.Empty; public bool Success { get; set; } = true; public bool Running { get; set; } public string Mode { get; set; } = "none"; public int BrightnessPercent { get; set; } public int TargetPercent { get; set; } public string Message { get; set; } = string.Empty; public List Lights { get; set; } = []; } public sealed class HomeAssistantSetParameterInput { public string DeviceId { get; set; } = string.Empty; public string? EntityId { get; set; } public string ParameterType { get; set; } = string.Empty; public object? Value { get; set; } } public sealed class HomeAssistantSetParameterOutput { public bool Success { get; set; } public string DeviceId { get; set; } = string.Empty; public string ParameterType { get; set; } = string.Empty; public string Message { get; set; } = string.Empty; } public sealed class HomeAssistantSceneOutput { public ClimateAdviceOutput? ClimateAdvice { get; set; } public string SceneCode { get; set; } = string.Empty; public string SceneName { get; set; } = string.Empty; public bool Success { get; set; } public string Status { get; set; } = string.Empty; public string Message { get; set; } = string.Empty; public DateTimeOffset ExecutedAt { get; set; } = DateTimeOffset.Now; public List Actions { get; set; } = []; } public sealed class HomeAssistantSceneActionOutput { public string Name { get; set; } = string.Empty; public string EntityId { get; set; } = string.Empty; public string Status { get; set; } = string.Empty; public string Message { get; set; } = string.Empty; }