1
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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;
|
||||
|
||||
/// <summary>新增家具实现此契约并注册即可;场景和 API 不枚举具体家具类型。</summary>
|
||||
public interface IHealthDeviceModule
|
||||
{
|
||||
string Key { get; }
|
||||
string Category { get; }
|
||||
string DisplayName { get; }
|
||||
string PrimaryEntityId { get; }
|
||||
bool PowerUsesIndependentGateway { get; }
|
||||
IReadOnlyList<DeviceParameterDefinition> Parameters { get; }
|
||||
IEnumerable<string> 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<DeviceCommand> GetShutdownCommands();
|
||||
HomeAssistantScenePresetItem? BuildPreview(PersonalizedSceneConfig config, string constitutionCode);
|
||||
}
|
||||
Reference in New Issue
Block a user