From 669ef7fc2d693dffb1e55d7d2372a4d767ed5d07 Mon Sep 17 00:00:00 2001 From: Chris Nussbaum Date: Mon, 5 Aug 2024 12:31:58 -0500 Subject: [PATCH] I can remove todo list items by simply marking them done and NuGet updates --- .../Announcements/AnnouncementsService.cs | 2 -- .../ElectronicsTime/ElectronicsTimeApp.cs | 17 ++++++++++++----- .../NuttyTree.NetDaemon.Application.csproj | 12 ++++++------ .../NuttyTree.NetDaemon.Infrastructure.csproj | 2 +- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/NuttyTree.NetDaemon.Application/Announcements/AnnouncementsService.cs b/src/NuttyTree.NetDaemon.Application/Announcements/AnnouncementsService.cs index 4500461..18b4b95 100644 --- a/src/NuttyTree.NetDaemon.Application/Announcements/AnnouncementsService.cs +++ b/src/NuttyTree.NetDaemon.Application/Announcements/AnnouncementsService.cs @@ -100,7 +100,6 @@ public void DisableAnnouncements(int minutes) nextAnnouncementAvailable.TrySetResult(); }); logger.LogInformation("Announcements disabled until {DisabledUntil}", disabledUntil); - haContext?.SetEntityState("binary_sensor.announcments_enabled", "off", new { until = $"{(minutes == int.MaxValue ? "Indefinitely" : disabledUntil)}" }); } } @@ -110,7 +109,6 @@ public void EnableAnnouncements() disabledUntil = null; nextAnnouncementAvailable.TrySetResult(); logger.LogInformation("Announcements enabled"); - haContext?.SetEntityState("binary_sensor.announcments_enabled", "on", new { }); } public void SendAnnouncement( diff --git a/src/NuttyTree.NetDaemon.Application/ElectronicsTime/ElectronicsTimeApp.cs b/src/NuttyTree.NetDaemon.Application/ElectronicsTime/ElectronicsTimeApp.cs index 6f87819..59f4e4c 100644 --- a/src/NuttyTree.NetDaemon.Application/ElectronicsTime/ElectronicsTimeApp.cs +++ b/src/NuttyTree.NetDaemon.Application/ElectronicsTime/ElectronicsTimeApp.cs @@ -116,11 +116,18 @@ private async Task HandleToDoListChangeAsync(StateChange - - - - - - + + + + + + diff --git a/src/NuttyTree.NetDaemon.Infrastructure/NuttyTree.NetDaemon.Infrastructure.csproj b/src/NuttyTree.NetDaemon.Infrastructure/NuttyTree.NetDaemon.Infrastructure.csproj index 6aaa9cd..1c64b96 100644 --- a/src/NuttyTree.NetDaemon.Infrastructure/NuttyTree.NetDaemon.Infrastructure.csproj +++ b/src/NuttyTree.NetDaemon.Infrastructure/NuttyTree.NetDaemon.Infrastructure.csproj @@ -8,7 +8,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive