👀 Summary
We are proud to announce the new release of NetDaemon. NetDaemon is a platform for creating applications or automations for Home Assistant in .Net 6 with C#10.
The brand new HassModel API
This new release includes a preview version of a whole new API that we call HassModel. HassModel is a .Net API that makes it easier than ever to interact with Home Assistant from .Net. It allows you to do things like responding to state changes of entities and calling Home Assistant sevices. You get strong typed interfaces that are generated based on the entities in your own Home Assistant, their attributes and all available services and their parameters. Because the code is generated from your own home assistant you can use intellisense to discover all your entities or services with their input parameters.
The V2 API will be supported while we get the new API feature complete plus a fair amount of time to move to the new API.
A big shout out to @FrankBakkerNl for making this API and for @doug and @mightymouse for helping out trying early drops of this new API. Helps a lot!
Single .NET class app
Besides the new API we also made it easier to create apps in NetDaemon. A NetDaemon app can now consist of just a single .Net class that is decorated with a [NetdaemonApp] attribute. Your apps will be loaded when NetDaemon starts. Typically using the Netdaemon docker container that you can install as a Home Assistant addon. This means that you do not have to use yaml to instance apps in NetDaemon. The yaml option will always be available too.
.NET 6 and C# 10!
With this release we are moving to .NET 6 and C# 10! You will need to update your project files. Easiest is to use the new version of the template project https://github.com/net-daemon/netdaemon-app-template as a base for your automations and copy old automation files to the new project.
This release also contains various bug fixes and enhancements. We are now also publish docker images on GitHub image registry.
The dev team hope you will enjoy this new release!
💥 Breaking changes
- #485 Adding HassModel to NetDaemon API @FrankBakkerNl
- #517 Made State[All]Changes() Methods iso Properties @FrankBakkerNl
- #519 .net 6 @helto4real
We are as of this release remove support for very old V1 API Home Assistant add-on. You can use the version 21.05.0
docker container and nuget packages to use it.
✨ New features
- #485 Adding HassModel to NetDaemon API @FrankBakkerNl
- #495 Add code generator to nuget and dotnet CLI @helto4real
- #494 Events on ha context (#478) @FrankBakkerNl
- #498 Enumerable extensions @FrankBakkerNl
- #500 Scheduling extension support @helto4real
- #502 Exposes the schedulers time in scheduling API @helto4real
- #503 Publish dev images to ghcr @ludeeus
- #504 Add context name in default logging @helto4real
⚡ Enhancements
- #419 Fix the area feature @helto4real
- #430 add test support for dynamic binary_sensor, sensor and switch @Zorgino
- #433 add generic RxAppMock @Zorgino
- #457 fix camelCase confused with PascalCase @Zorgino
- #462 Integration test improvements @ludeeus
- #464 Use container logs instead of log file @ludeeus
- #472 Update admin version @ludeeus
- #485 Adding HassModel to NetDaemon API @FrankBakkerNl
- #493 Add HassModel NuGet package @helto4real
- #496 Fix port setting and help option @helto4real
- #497 Load settings for codegen from current folder cconfig @FrankBakkerNl
- #503 Publish dev images to ghcr @ludeeus
- #505 ServiceTarget.FromEntities support @helto4real
- #506 Adds GH container registry for release and manual release @helto4real
- #519 .net 6 @helto4real
- #525 Log correct app type on startup @FrankBakkerNl
- #531 Add JsonPropertyName Attributes to Event class of HassModel @FrankBakkerNl
- #532 Added Error when using [Focus] while not in development @FrankBakkerNl
- #535 Remove beta from nuget versioning @helto4real
🐛 Bug Fixes
- #419 Fix the area feature @helto4real
⬆️ Dependency Updates
- #424 Bump Microsoft.AspNetCore.Mvc.NewtonsoftJson from 5.0.8 to 5.0.9 @dependabot
- #425 Bump Microsoft.AspNetCore.TestHost from 5.0.8 to 5.0.9 @dependabot
- #426 Bump Microsoft.CodeAnalysis.CSharp from 3.10.0 to 3.11.0 @dependabot
- #427 Bump Microsoft.NET.Test.Sdk from 16.10.0 to 16.11.0 @dependabot
- #431 Bump Roslynator.Analyzers from 3.2.0 to 3.2.2 @dependabot
- #468 Bump Microsoft.AspNetCore.Mvc.NewtonsoftJson from 5.0.9 to 5.0.10 @dependabot
- #469 Bump Microsoft.AspNetCore.TestHost from 5.0.9 to 5.0.10 @dependabot
- #490 Bump JoySoftware.HassClient from 21.30.1-beta to 21.35.0-beta @dependabot
- #489 Bump FluentAssertions from 6.1.0 to 6.2.0 @dependabot
- #477 Bump Microsoft.AspNetCore.Mvc.NewtonsoftJson from 5.0.10 to 5.0.11 @dependabot
- #476 Bump Microsoft.AspNetCore.TestHost from 5.0.10 to 5.0.11 @dependabot
- #488 Bump Microsoft.NET.Test.Sdk from 16.11.0 to 17.0.0 @dependabot
- #507 chore: update highbyte/sonarscan-dotnet to v2.1.2 @BeeHiveJava
- #524 New HassClient using .NET 6 @helto4real
- #527 Fix reconnect bug @helto4real
- #533 Bump Serilog.Sinks.Console from 4.0.0 to 4.0.1 @dependabot