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));
 }
Ejemplo n.º 2
0
        public void UpdateEntityWithSameEntityIdThrows()
        {
            var testEntity = new EntityRegistryEntry("switch.TestEntity", null, null);

            Assert.ThrowsAsync <ArgumentException>(() => this.hassWSApi.UpdateEntityAsync(testEntity, testEntity.EntityId));
        }