This commit is contained in:
fuenmao
2026-10-09 16:46:30 +08:00
parent 4a634ef4c2
commit e6b90a06ab
63 changed files with 4170 additions and 1518 deletions
@@ -0,0 +1,19 @@
namespace Evergreen.Health.Application.Health.Integrations.Tuya;
/// <summary>未来独立涂鸦模块使用本接口,不要求经过 Home Assistant。</summary>
public sealed record TuyaCapabilityWrite(string DeviceId, string Code, object? Value);
public interface ITuyaGateway
{
bool IsConfigured { get; }
Task WriteAsync(TuyaCapabilityWrite command, CancellationToken cancellationToken);
}
public sealed class ReservedTuyaGateway : ITuyaGateway
{
public bool IsConfigured => false;
public Task WriteAsync(TuyaCapabilityWrite command, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
throw new NotSupportedException("涂鸦接入仅预留,本版没有发送控制命令");
}
}