diff --git a/src/NetDaemon.Templates.Project/templates/netdaemon/README.md b/src/NetDaemon.Templates.Project/templates/netdaemon/README.md index e2234ef..ec45f4a 100644 --- a/src/NetDaemon.Templates.Project/templates/netdaemon/README.md +++ b/src/NetDaemon.Templates.Project/templates/netdaemon/README.md @@ -6,6 +6,8 @@ This is generated using NetDaemon runtime version 3.1 and .NET 7. ## Getting started Please see [netdaemon.xyz](https://netdaemon.xyz/docs/v3) for more information about getting starting developing apps for Home Assistant using NetDaemon. +Please add code generation features in `program.cs` when using code generation features by removing comments! + ## Issues - If you have issues or suggestions of improvements to this template, please [add an issue](https://github.com/net-daemon/netdaemon-app-template) diff --git a/src/NetDaemon.Templates.Project/templates/netdaemon/program.cs b/src/NetDaemon.Templates.Project/templates/netdaemon/program.cs index 6eb19c6..19eb880 100644 --- a/src/NetDaemon.Templates.Project/templates/netdaemon/program.cs +++ b/src/NetDaemon.Templates.Project/templates/netdaemon/program.cs @@ -4,6 +4,8 @@ using NetDaemon.Extensions.Scheduler; using NetDaemon.Extensions.Tts; using NetDaemon.Runtime; +// Add next line if using code generator +//using HomeAssistantGenerated; #pragma warning disable CA1812 @@ -19,6 +21,8 @@ await Host.CreateDefaultBuilder(args) .AddAppsFromAssembly(Assembly.GetExecutingAssembly()) .AddNetDaemonStateManager() .AddNetDaemonScheduler() + // Add next line if using code generator + // .AddHomeAssistantGenerated() ) .Build() .RunAsync() diff --git a/src/NetDaemon.Templates.Project/templates/netdaemon_src/README.md b/src/NetDaemon.Templates.Project/templates/netdaemon_src/README.md index 1f5bec0..2eed501 100644 --- a/src/NetDaemon.Templates.Project/templates/netdaemon_src/README.md +++ b/src/NetDaemon.Templates.Project/templates/netdaemon_src/README.md @@ -6,6 +6,8 @@ This is generated using NetDaemon runtime version 3.1 and .NET 7. ## Getting started Please see [netdaemon.xyz](https://netdaemon.xyz/docs/v3) for more information about getting starting developing apps for Home Assistant using NetDaemon. +Please add code generation features in `program.cs` when using code generation features by removing comments! + ## Issues - If you have issues or suggestions of improvements to this template, please [add an issue](https://github.com/net-daemon/netdaemon-app-template) diff --git a/src/NetDaemon.Templates.Project/templates/netdaemon_src/program.cs b/src/NetDaemon.Templates.Project/templates/netdaemon_src/program.cs index a75769a..cb5ea7b 100644 --- a/src/NetDaemon.Templates.Project/templates/netdaemon_src/program.cs +++ b/src/NetDaemon.Templates.Project/templates/netdaemon_src/program.cs @@ -6,6 +6,8 @@ using NetDaemon.Extensions.Logging; using NetDaemon.Extensions.Scheduler; using NetDaemon.Extensions.Tts; +// Add next line if using code generator +//using HomeAssistantGenerated; #pragma warning disable CA1812 @@ -21,6 +23,8 @@ await Host.CreateDefaultBuilder(args) .AddAppsFromAssembly(Assembly.GetExecutingAssembly()) .AddNetDaemonStateManager() .AddNetDaemonScheduler() + // Add next line if using code generator + // .AddHomeAssistantGenerated() ) .Build() .RunAsync()