Skip to content

Commit

Permalink
Add placeholder HomeAssistantGenerated.cs (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankBakkerNl authored Oct 26, 2024
1 parent de8f2af commit 7b51ba0
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// This is a placeholder for the HomeAssistantGenerated.cs file that will be generated when running nd-codegen
//
// To update this file with latest entities run this command in your project directory:
// dotnet tool run nd-codegen
//
// In the template projects we provided a convenience powershell script that will update
// the codegen and nugets to latest versions update_all_dependencies.ps1.
//
// For more information: https://netdaemon.xyz/docs/user/hass_model/hass_model_codegen
// For more information about NetDaemon: https://netdaemon.xyz/
//------------------------------------------------------------------------------
using Microsoft.Extensions.DependencyInjection;

namespace HomeAssistantGenerated;
public static class GeneratedExtensions
{
///<summary>Dummy implementation of AddHomeAssistantGenerated()</summary>
///<remarks>Run nd-codegen to overwrite this file</remarks>
public static IServiceCollection AddHomeAssistantGenerated(this IServiceCollection serviceCollection)
{
return serviceCollection;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
using NetDaemon.Extensions.Scheduler;
using NetDaemon.Extensions.Tts;
using NetDaemon.Runtime;
// Add next line if using code generator
//using HomeAssistantGenerated;
using HomeAssistantGenerated;

#pragma warning disable CA1812

Expand All @@ -21,8 +20,7 @@ await Host.CreateDefaultBuilder(args)
.AddAppsFromAssembly(Assembly.GetExecutingAssembly())
.AddNetDaemonStateManager()
.AddNetDaemonScheduler()
// Add next line if using code generator
// .AddHomeAssistantGenerated()
.AddHomeAssistantGenerated()
)
.Build()
.RunAsync()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// This is a placeholder for the HomeAssistantGenerated.cs file that will be generated when running nd-codegen
//
// To update this file with latest entities run this command in your project directory:
// dotnet tool run nd-codegen
//
// In the template projects we provided a convenience powershell script that will update
// the codegen and nugets to latest versions update_all_dependencies.ps1.
//
// For more information: https://netdaemon.xyz/docs/user/hass_model/hass_model_codegen
// For more information about NetDaemon: https://netdaemon.xyz/
//------------------------------------------------------------------------------
using Microsoft.Extensions.DependencyInjection;

namespace HomeAssistantGenerated;
public static class GeneratedExtensions
{
///<summary>Dummy implementation of AddHomeAssistantGenerated()</summary>
///<remarks>Run nd-codegen to overwrite this file</remarks>
public static IServiceCollection AddHomeAssistantGenerated(this IServiceCollection serviceCollection)
{
return serviceCollection;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
using NetDaemon.Extensions.Logging;
using NetDaemon.Extensions.Scheduler;
using NetDaemon.Extensions.Tts;
// Add next line if using code generator
//using HomeAssistantGenerated;
using HomeAssistantGenerated;

#pragma warning disable CA1812

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

0 comments on commit 7b51ba0

Please sign in to comment.