Skip to content

Commit

Permalink
Added a way to send data to generated service call extensions for mis…
Browse files Browse the repository at this point in the history
…sing metadata
  • Loading branch information
helto4real committed May 7, 2024
1 parent dff49c8 commit b1f5b22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ private static IEnumerable<MemberDeclarationSyntax> GenerateExtensionMethodsForS
private static MemberDeclarationSyntax ExtensionMethodWithoutArguments(HassService service, string serviceName, string entityTypeName)
{
return ParseMemberDeclaration($$"""
public static void {{GetServiceMethodName(serviceName)}}(this {{entityTypeName}} target)
public static void {{GetServiceMethodName(serviceName)}}(this {{entityTypeName}} target, object? data = null)
{
target.CallService("{{serviceName}}");
target.CallService("{{serviceName}}", data);
}
""")!
.WithSummaryComment(service.Description);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private static SyntaxTrivia[] GetFileHeader()
// 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/v3/hass_model/hass_model_codegen
// For more information: https://netdaemon.xyz/docs/user/hass_model/hass_model_codegen
// For more information about NetDaemon: https://netdaemon.xyz/
// </auto-generated>
//------------------------------------------------------------------------------";
Expand Down

0 comments on commit b1f5b22

Please sign in to comment.