Example #1
0
 public MockRegistryEntity(EntityRegistryEntryBase entry, DisabledByEnum disabledBy = DisabledByEnum.None)
     : this(entry.EntityId, entry.Name, entry.Icon, disabledBy)
 {
     this.Entry    = entry;
     this.UniqueId = entry.UniqueId;
     this.Name     = entry.Name;
     this.Icon     = entry.Icon;
 }
Example #2
0
 private Device CreateTestEntry(out string entityId, out string name, out string areaId, out DisabledByEnum disabledBy)
 {
     entityId   = MockHelpers.GetRandomEntityId(KnownDomains.Esphome);
     name       = MockHelpers.GetRandomTestName();
     areaId     = MockHelpers.GetRandomTestName();
     disabledBy = DisabledByEnum.Integration;
     return(Device.CreateUnmodified(entityId, name, areaId, disabledBy));
 }
Example #3
0
 public MockRegistryEntity(string entityId, string originalName, string originalIcon = null, DisabledByEnum disabledBy = DisabledByEnum.None)
     : base(entityId, null, null, disabledBy)
 {
     this.OriginalName = originalName;
     this.OriginalIcon = originalIcon;
 }
 private EntityRegistryEntry CreateTestEntry(out string entityId, out string name, out string icon, out DisabledByEnum disabledBy)
 {
     entityId   = MockHelpers.GetRandomEntityId(KnownDomains.InputBoolean);
     name       = MockHelpers.GetRandomTestName();
     icon       = "mdi:camera";
     disabledBy = DisabledByEnum.Integration;
     return(EntityRegistryEntry.CreateUnmodified(entityId, name, icon, disabledBy));
 }