Skip to content

Commit

Permalink
Merge pull request #23 from net-daemon/promote-add-generation
Browse files Browse the repository at this point in the history
Add easy adding of code generation features in template
  • Loading branch information
helto4real authored Feb 12, 2023
2 parents 63b5485 + 4b15339 commit 4a5499b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/NetDaemon.Templates.Project/templates/netdaemon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -19,6 +21,8 @@ await Host.CreateDefaultBuilder(args)
.AddAppsFromAssembly(Assembly.GetExecutingAssembly())
.AddNetDaemonStateManager()
.AddNetDaemonScheduler()
// Add next line if using code generator
// .AddHomeAssistantGenerated()
)
.Build()
.RunAsync()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -21,6 +23,8 @@ await Host.CreateDefaultBuilder(args)
.AddAppsFromAssembly(Assembly.GetExecutingAssembly())
.AddNetDaemonStateManager()
.AddNetDaemonScheduler()
// Add next line if using code generator
// .AddHomeAssistantGenerated()
)
.Build()
.RunAsync()
Expand Down

0 comments on commit 4a5499b

Please sign in to comment.