using Evergreen.Health.Application.Health.Integrations.HomeAssistant;
using Evergreen.Health.Application.Health.Models;
using Evergreen.Health.Application.Health.Scenes;
namespace Evergreen.Health.Application.Health.Devices.Contracts;
/// 新增家具实现此契约并注册即可;场景和 API 不枚举具体家具类型。
public interface IHealthDeviceModule
{
string Key { get; }
string Category { get; }
string DisplayName { get; }
string PrimaryEntityId { get; }
bool PowerUsesIndependentGateway { get; }
IReadOnlyList Parameters { get; }
IEnumerable EntityIds { get; }
DeviceCommand BuildParameterCommand(string parameterType, object? value);
Task ExecuteParameterAsync(DeviceCommand command, CancellationToken cancellationToken);
bool ParameterUsesIndependentGateway(DeviceCommand command);
Task SetPowerAsync(bool turnOn, CancellationToken cancellationToken);
Task ExecuteSleepAsync(DeviceSceneContext context, PersonalizedSceneConfig config,
string constitutionCode, CancellationToken cancellationToken);
IEnumerable GetShutdownCommands();
HomeAssistantScenePresetItem? BuildPreview(PersonalizedSceneConfig config, string constitutionCode);
}