diff --git a/src/Runtime/NetDaemon.Runtime/Internal/HomeAssistantConnectionExtensions.cs b/src/Client/NetDaemon.HassClient/Common/HomeAssistant/Extensions/HomeAssistantConnectionHelpersExtensions.cs similarity index 90% rename from src/Runtime/NetDaemon.Runtime/Internal/HomeAssistantConnectionExtensions.cs rename to src/Client/NetDaemon.HassClient/Common/HomeAssistant/Extensions/HomeAssistantConnectionHelpersExtensions.cs index 2c775f87a..ddbd34fc2 100644 --- a/src/Runtime/NetDaemon.Runtime/Internal/HomeAssistantConnectionExtensions.cs +++ b/src/Client/NetDaemon.HassClient/Common/HomeAssistant/Extensions/HomeAssistantConnectionHelpersExtensions.cs @@ -1,8 +1,6 @@ -using NetDaemon.Runtime.Internal.Model; +namespace NetDaemon.Client.HomeAssistant.Extensions; -namespace NetDaemon.Runtime.Internal; - -internal static class HomeAssistantConnectionExtensions +public static class HomeAssistantConnectionHelpersExtensions { public static async Task CreateInputBooleanHelperAsync( this IHomeAssistantConnection connection, diff --git a/src/Runtime/NetDaemon.Runtime/Internal/Model/HassHelper.cs b/src/Client/NetDaemon.HassClient/Common/HomeAssistant/Model/InputBooleanHelper.cs similarity index 53% rename from src/Runtime/NetDaemon.Runtime/Internal/Model/HassHelper.cs rename to src/Client/NetDaemon.HassClient/Common/HomeAssistant/Model/InputBooleanHelper.cs index c945645e5..0850c8e53 100644 --- a/src/Runtime/NetDaemon.Runtime/Internal/Model/HassHelper.cs +++ b/src/Client/NetDaemon.HassClient/Common/HomeAssistant/Model/InputBooleanHelper.cs @@ -1,10 +1,10 @@ using System.Text.Json.Serialization; -namespace NetDaemon.Runtime.Internal.Model; +namespace NetDaemon.Client.HomeAssistant.Model; -internal record InputBooleanHelper +public record InputBooleanHelper { - [JsonPropertyName("name")] public string Name { get; init; } = string.Empty; + [JsonPropertyName("name")] public string Name { get; init; } = String.Empty; [JsonPropertyName("icon")] public string? Icon { get; init; } - [JsonPropertyName("id")] public string Id { get; init; } = string.Empty; + [JsonPropertyName("id")] public string Id { get; init; } = String.Empty; } \ No newline at end of file diff --git a/src/Runtime/NetDaemon.Runtime/Internal/Model/CreateInputBooleanHelperCommand.cs b/src/Client/NetDaemon.HassClient/Internal/HomeAssistant/Commands/CreateInputBooleanHelperCommand.cs similarity index 70% rename from src/Runtime/NetDaemon.Runtime/Internal/Model/CreateInputBooleanHelperCommand.cs rename to src/Client/NetDaemon.HassClient/Internal/HomeAssistant/Commands/CreateInputBooleanHelperCommand.cs index 3d8a60990..758270374 100644 --- a/src/Runtime/NetDaemon.Runtime/Internal/Model/CreateInputBooleanHelperCommand.cs +++ b/src/Client/NetDaemon.HassClient/Internal/HomeAssistant/Commands/CreateInputBooleanHelperCommand.cs @@ -1,7 +1,7 @@ using System.Text.Json.Serialization; using NetDaemon.Client.HomeAssistant.Model; -namespace NetDaemon.Runtime.Internal.Model; +namespace NetDaemon.Client.Internal.HomeAssistant.Commands; internal record CreateInputBooleanHelperCommand : CommandMessage { @@ -10,7 +10,7 @@ public CreateInputBooleanHelperCommand() Type = "input_boolean/create"; } - [JsonPropertyName("name")] public string Name { get; init; } = string.Empty; + [JsonPropertyName("name")] public required string Name { get; init; } } internal record DeleteInputBooleanHelperCommand : CommandMessage @@ -20,7 +20,7 @@ public DeleteInputBooleanHelperCommand() Type = "input_boolean/delete"; } - [JsonPropertyName("input_boolean_id")] public string InputBooleanId { get; init; } = string.Empty; + [JsonPropertyName("input_boolean_id")] public required string InputBooleanId { get; init; } = string.Empty; } internal record ListInputBooleanHelperCommand : CommandMessage diff --git a/src/Runtime/NetDaemon.Runtime.Tests/Internal/AppStateManagerTests.cs b/src/Runtime/NetDaemon.Runtime.Tests/Internal/AppStateManagerTests.cs index eaa8553b3..fd9d61433 100644 --- a/src/Runtime/NetDaemon.Runtime.Tests/Internal/AppStateManagerTests.cs +++ b/src/Runtime/NetDaemon.Runtime.Tests/Internal/AppStateManagerTests.cs @@ -6,7 +6,6 @@ using NetDaemon.Client.Internal.Exceptions; using NetDaemon.HassModel; using NetDaemon.Runtime.Internal; -using NetDaemon.Runtime.Internal.Model; namespace NetDaemon.Runtime.Tests.Internal; @@ -109,7 +108,7 @@ public async Task TestGetStateAsyncNotExistReturnsCorrectStateEnabled() n.SendCommandAndReturnResponseAsync( It.IsAny(), It.IsAny())); haConnectionMock.Verify(n => - n.SendCommandAsync(It.IsAny(), + n.SendCommandAsync(It.IsAny(), It.IsAny())); } diff --git a/src/Runtime/NetDaemon.Runtime.Tests/Internal/AppStateRepositoryTests.cs b/src/Runtime/NetDaemon.Runtime.Tests/Internal/AppStateRepositoryTests.cs index 0a7ec8a4e..f006b32b2 100644 --- a/src/Runtime/NetDaemon.Runtime.Tests/Internal/AppStateRepositoryTests.cs +++ b/src/Runtime/NetDaemon.Runtime.Tests/Internal/AppStateRepositoryTests.cs @@ -2,7 +2,6 @@ using Microsoft.Extensions.Hosting; using NetDaemon.Client.Internal.Exceptions; using NetDaemon.Runtime.Internal; -using NetDaemon.Runtime.Internal.Model; namespace NetDaemon.Runtime.Tests.Internal;