diff --git a/NetDaemonApps/NetDaemonApps/AreaControl/AreaControl.cs b/NetDaemonApps/NetDaemonApps/AreaControl/AreaControl.cs
index f53472e..1b5f163 100644
--- a/NetDaemonApps/NetDaemonApps/AreaControl/AreaControl.cs
+++ b/NetDaemonApps/NetDaemonApps/AreaControl/AreaControl.cs
@@ -101,19 +101,19 @@ namespace NetDaemonApps.AreaControl
}
- public virtual void SunDawn()
+ public virtual void SunDawn(NotifyServices notifyServices)
{
}
- public virtual void SunRising()
+ public virtual void SunRising(NotifyServices notifyServices)
{
}
- public virtual void SunDusk()
+ public virtual void SunDusk(NotifyServices notifyServices)
{
}
- public virtual void SunSetting()
+ public virtual void SunSetting(NotifyServices notifyServices)
{
}
}
diff --git a/NetDaemonApps/NetDaemonApps/AreaControl/Areas/Office.cs b/NetDaemonApps/NetDaemonApps/AreaControl/Areas/Office.cs
index 9d2bc45..fd3eaa8 100644
--- a/NetDaemonApps/NetDaemonApps/AreaControl/Areas/Office.cs
+++ b/NetDaemonApps/NetDaemonApps/AreaControl/Areas/Office.cs
@@ -20,7 +20,7 @@ namespace NetDaemonApps.AreaControl.Areas
///
/// Morgendämmerung
///
- public override void SunDawn()
+ public override void SunDawn(NotifyServices notifyServices)
{
}
@@ -28,7 +28,7 @@ namespace NetDaemonApps.AreaControl.Areas
///
/// Sonnenaufgang
///
- public override void SunRising()
+ public override void SunRising(NotifyServices notifyServices)
{
}
@@ -36,7 +36,7 @@ namespace NetDaemonApps.AreaControl.Areas
///
/// Abenddämmerung
///
- public override void SunDusk()
+ public override void SunDusk(NotifyServices notifyServices)
{
}
@@ -44,7 +44,7 @@ namespace NetDaemonApps.AreaControl.Areas
///
/// Sonnenuntergang
///
- public override void SunSetting()
+ public override void SunSetting(NotifyServices notifyServices)
{
}
diff --git a/NetDaemonApps/NetDaemonApps/AreaControl/Areas/TmpArea.cs b/NetDaemonApps/NetDaemonApps/AreaControl/Areas/TmpArea.cs
index bb9c49a..b6e9d23 100644
--- a/NetDaemonApps/NetDaemonApps/AreaControl/Areas/TmpArea.cs
+++ b/NetDaemonApps/NetDaemonApps/AreaControl/Areas/TmpArea.cs
@@ -93,7 +93,7 @@ namespace NetDaemonApps.AreaControl.Areas
///
/// Morgendämmerung
///
- public override void SunDawn()
+ public override void SunDawn(NotifyServices notifyServices)
{
notifyServices.Whatsapp("Morgendämmerung");
}
@@ -101,7 +101,7 @@ namespace NetDaemonApps.AreaControl.Areas
///
/// Sonnenaufgang
///
- public override void SunRising()
+ public override void SunRising(NotifyServices notifyServices)
{
notifyServices.Whatsapp("Sonnenaufgang");
}
@@ -109,7 +109,7 @@ namespace NetDaemonApps.AreaControl.Areas
///
/// Abenddämmerung
///
- public override void SunDusk()
+ public override void SunDusk(NotifyServices notifyServices)
{
notifyServices.Whatsapp("Abenddämmerung");
}
@@ -117,7 +117,7 @@ namespace NetDaemonApps.AreaControl.Areas
///
/// Sonnenuntergang
///
- public override void SunSetting()
+ public override void SunSetting(NotifyServices notifyServices)
{
notifyServices.Whatsapp("Sonnenuntergang");
}
diff --git a/NetDaemonApps/NetDaemonApps/NetDaemonApps.csproj b/NetDaemonApps/NetDaemonApps/NetDaemonApps.csproj
index e84031f..1383fbd 100644
--- a/NetDaemonApps/NetDaemonApps/NetDaemonApps.csproj
+++ b/NetDaemonApps/NetDaemonApps/NetDaemonApps.csproj
@@ -46,7 +46,6 @@
-
diff --git a/NetDaemonApps/NetDaemonApps/apps/Scheduler.cs b/NetDaemonApps/NetDaemonApps/apps/Scheduler.cs
index db9d47c..b46ff88 100644
--- a/NetDaemonApps/NetDaemonApps/apps/Scheduler.cs
+++ b/NetDaemonApps/NetDaemonApps/apps/Scheduler.cs
@@ -21,43 +21,43 @@ namespace NetDaemonApps.apps
AreaCollection = areaCollection;
notifyServices = new NotifyServices(haContext);
- scheduler.Schedule(DateTime.Parse(entities.Sensor.SunNextDawn.State), () => SunDawn()); // Morgendämmerung
- scheduler.Schedule(DateTime.Parse(entities.Sensor.SunNextRising.State), () => SunRising()); // Sonnenaufgang
+ scheduler.Schedule(DateTime.Parse(entities.Sensor.SunNextDawn.State), () => SunDawn(notifyServices)); // Morgendämmerung
+ scheduler.Schedule(DateTime.Parse(entities.Sensor.SunNextRising.State), () => SunRising(notifyServices)); // Sonnenaufgang
- scheduler.Schedule(DateTime.Parse(entities.Sensor.SunNextDusk.State), () => SunDusk()); // Abenddämmerung
- scheduler.Schedule(DateTime.Parse(entities.Sensor.SunNextSetting.State), () => SunSetting()); // Sonnenuntergang
+ scheduler.Schedule(DateTime.Parse(entities.Sensor.SunNextDusk.State), () => SunDusk(notifyServices)); // Abenddämmerung
+ scheduler.Schedule(DateTime.Parse(entities.Sensor.SunNextSetting.State), () => SunSetting(notifyServices)); // Sonnenuntergang
}
- private void SunDawn()
+ private void SunDawn(NotifyServices notifyServices)
{
foreach (var area in Enum.GetValues(typeof(AreaControlEnum)))
{
- AreaCollection.GetArea((AreaControlEnum)area).SunDawn();
+ AreaCollection.GetArea((AreaControlEnum)area).SunDawn(notifyServices);
}
}
- private async void SunRising()
+ private async void SunRising(NotifyServices notifyServices)
{
foreach (var area in Enum.GetValues(typeof(AreaControlEnum)))
{
- AreaCollection.GetArea((AreaControlEnum)area).SunRising();
+ AreaCollection.GetArea((AreaControlEnum)area).SunRising(notifyServices);
}
}
- private void SunDusk()
+ private void SunDusk(NotifyServices notifyServices)
{
foreach (var area in Enum.GetValues(typeof(AreaControlEnum)))
{
- AreaCollection.GetArea((AreaControlEnum)area).SunDusk();
+ AreaCollection.GetArea((AreaControlEnum)area).SunDusk(notifyServices);
}
}
- private void SunSetting()
+ private void SunSetting(NotifyServices notifyServices)
{
foreach (var area in Enum.GetValues(typeof(AreaControlEnum)))
{
- AreaCollection.GetArea((AreaControlEnum)area).SunSetting();
+ AreaCollection.GetArea((AreaControlEnum)area).SunSetting(notifyServices);
}
}
}
diff --git a/NetDaemonApps/NetDaemonApps/program.cs b/NetDaemonApps/NetDaemonApps/program.cs
index 9205c25..e5f2105 100644
--- a/NetDaemonApps/NetDaemonApps/program.cs
+++ b/NetDaemonApps/NetDaemonApps/program.cs
@@ -12,7 +12,7 @@ using NetDaemonInterface;
try
{
- Console.WriteLine("Starting v0.0.0");
+ Console.WriteLine("Starting v0.1");
await Host.CreateDefaultBuilder(args)
.UseNetDaemonAppSettings()
diff --git a/NetDaemonApps/NetDeamonInterface/IAreaControl.cs b/NetDaemonApps/NetDeamonInterface/IAreaControl.cs
index 7cf41d4..ad8884c 100644
--- a/NetDaemonApps/NetDeamonInterface/IAreaControl.cs
+++ b/NetDaemonApps/NetDeamonInterface/IAreaControl.cs
@@ -1,4 +1,5 @@
-using NetDaemonInterface;
+using HomeAssistantGenerated;
+using NetDaemonInterface;
namespace NetDaemonInterface;
@@ -17,21 +18,21 @@ public interface IAreaControl
///
/// Morgendämmerung
///
- public void SunDawn();
+ public void SunDawn(NotifyServices notifyServices);
///
/// Sonnenaufgang
///
- public void SunRising();
+ public void SunRising(NotifyServices notifyServices);
///
/// Abenddämmerung
///
- public void SunDusk();
+ public void SunDusk(NotifyServices notifyServices);
///
/// Sonnenuntergang
///
- public void SunSetting();
+ public void SunSetting(NotifyServices notifyServices);
}