NetDaemon.HassModel.CodeGen 25.18.1

Prefix Reserved
dotnet tool install --global NetDaemon.HassModel.CodeGen --version 25.18.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local NetDaemon.HassModel.CodeGen --version 25.18.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=NetDaemon.HassModel.CodeGen&version=25.18.1
                    
nuke :add-package NetDaemon.HassModel.CodeGen --version 25.18.1
                    

NetDaemon - Write your automations in C# for Home Assistant

CI build Coverage Status

Welcome to the NetDaemon project!

NetDaemon is an application daemon that enables you to write powerful home automation scripts in C# for Home Assistant. This repository contains NetDaemon V5, the latest version of the framework.

About NetDaemon

NetDaemon was founded by @helto4real in 2020 as a personal project to explore the use of C# in Home Assistant. Early contributions from @Ludeeus helped integrate NetDaemon with Home Assistant. The project gained significant momentum when @FrankBakkerNl joined and introduced the HassModel API, which leverages code generation to create a user-friendly experience.

Currently, @helto4real and @FrankBakkerNl serve as the primary maintainers, though many others have contributed over the years.

Getting Started

To learn how to install and use NetDaemon, visit our official documentation:

🔗 Getting Started Guide

Usage

NetDaemon allows you to write your automations easily and cleanly using C#.

[NetDaemonApp]
class MyApp
{
    public MyApp(Entities entities)
    {
        LightEntity hallwayLight = entities.Light.HallwayLight;
        BinarySensorEntity motionSensor = entities.BinarySensor.HallwayMotionSensor;
        
        // Check state of entities directly
        if (motionSensor.IsOn() && hallwayLight.IsOff()){
            hallwayLight.TurnOn();
        }

        // Subscribe to changes in the state of the motion sensor
        motionSensor.StateChanges()
            .Where(e => e.New?.IsOn() ?? false)
            .Subscribe(_ => hallwayLight.TurnOn());
    }
}

Support & Community

If you have issues or suggestions, please feel free to:

Contributions are welcome! If you'd like to help improve NetDaemon, we encourage you to join our Discord server to learn more about how you can contribute to the project.

Release Notes

Check out the Release Notes for detailed information on the latest changes, bug fixes, and new features.

NetDaemon is stable, and we're committed to maintaining that stability by minimizing breaking changes in future releases.

Versioning

NetDaemon uses the CalVer versioning system for its NuGet packages. The version format is YYYY.WW.PATCH, where:

  • YYYY.WW represents the year and week number (01-52).
  • PATCH indicates the patch version of the release.

Developer notes

To automatically upgrade all NuGet packages, use the dotnet-outdated-tool:

  1. Install the tool with the following command:
dotnet tool install --global dotnet-outdated-tool
  1. Run this command to upgrade all packages:
dotnet outdated --pre-release Never --upgrade
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
25.18.1 331 5/10/2025
25.18.0 213 5/6/2025
25.14.1 602 4/13/2025
25.14.0 280 4/13/2025
25.10.0 635 3/16/2025
25.6.0 835 2/16/2025
25.5.0 628 2/8/2025
24.52.0 1,188 12/23/2024
24.51.0 476 12/22/2024
24.50.0 1,009 12/9/2024
24.47.0-alpha-3 109 11/24/2024
24.43.0 1,307 10/26/2024
24.42.0 592 10/17/2024
24.37.1 1,159 9/15/2024
24.37.0 405 9/11/2024
24.35.1 428 9/1/2024
24.35.0 378 8/26/2024
24.34.0 316 8/25/2024
24.33.0 480 8/18/2024
24.28.1 679 7/14/2024
24.28.0 317 7/11/2024
24.28.0-alpha-3 89 7/11/2024
24.27.1 353 7/7/2024
24.27.0 298 7/7/2024
24.27.0-alpha-3 115 7/6/2024
24.27.0-alpha-2 123 7/3/2024
24.26.0 407 6/26/2024
24.25.0 321 6/24/2024
24.23.0 496 6/10/2024
24.23.0-alpha-4 100 6/8/2024
24.21.0 551 5/20/2024
24.18.0-alpha-4 121 5/1/2024
24.18.0-alpha-3 117 5/1/2024
24.17.0-alpha-2 113 4/28/2024
24.17.0-alpha-1 93 4/28/2024
24.16.0 642 4/21/2024
24.12.0 912 3/21/2024
24.8.0 705 2/24/2024
24.3.1 888 1/20/2024
24.3.0 187 1/20/2024
24.1.0-alpha-5 212 1/5/2024
23.46.1 1,215 11/19/2023
23.46.0 224 11/18/2023
23.46.0-alpha-14 166 11/14/2023
23.44.2-alpha-10 227 11/3/2023
23.43.0-alpha 203 10/28/2023
23.42.0-alpha 192 10/22/2023