This commit is contained in:
Marius
2026-03-08 19:10:16 +02:00
commit 861c344832
74 changed files with 34756 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
using HomeAssistant.Models;
using NetDaemon.Extensions.MqttEntityManager;
namespace PowerMonitor.Models;
public sealed class PowerMonitorEntity : EntityCreateModel
{
public string Domain { get; }
public string Identifier { get; }
public string Name { get; }
public PowerMonitorEntity(string domain, string identifier, string name)
{
Domain = domain;
Identifier = identifier;
EntityId = $"{Domain}.{Identifier}";
Name = string.IsNullOrWhiteSpace(name) ? identifier : name;
Options = new EntityCreationOptions
{
UniqueId = EntityId,
Name = Name
};
}
}