39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using HomeAssistant.Entities.Interfaces;
|
|
using HomeAssistant.Models;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace HomeAssistant.HistoryReplay.Replay;
|
|
|
|
public sealed class NoOpEntityManager(ILogger<NoOpEntityManager> logger) : IEntityManager
|
|
{
|
|
public Task CreateEntitiesAsync(ICollection<EntityCreateModel> entities)
|
|
{
|
|
logger.LogDebug("[REPLAY] Would create {Count} entities", entities.Count);
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
public Task CreateEntityAsync(EntityCreateModel createModel)
|
|
{
|
|
logger.LogDebug("[REPLAY] Would create entity: {EntityId}", createModel.EntityId);
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
public Task SetEntityState(string entityId, string state)
|
|
{
|
|
logger.LogDebug("[REPLAY] Would set state for {EntityId}: {State}", entityId, state);
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
public Task SetEntityAttributes(string entityId, object attributes)
|
|
{
|
|
logger.LogDebug("[REPLAY] Would set attributes for {EntityId}", entityId);
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
public Task RemoveEntity(string entityId)
|
|
{
|
|
logger.LogDebug("[REPLAY] Would remove entity: {EntityId}", entityId);
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|