Auto generated API

NetDaemon has en experimental support for generating helper entities for your enitites in your installation. I does not support all entity types for now but will be added more and more as we add more specific support in the fluent API. The autogenerated stuff will expand with helpers for service calls etc. in the future.

Generated entities

Example of generated entities:

using Netdaemon.Generated.Extensions;
public override async Task InitializeAsync()
// Turn on a light generated from your entities
await this.LightEx().BedroomWindow.TurnOn().ExecuteAsync();
// Play mediaplayer generated from your entities
await this.MediaPlayerEx().PlexPlayer.Play().ExecuteAsync();

Turn on and off code generation

Code generation can be turned on and off in different run-time environments:

EnvHow to configure
Add-onThere is a setting in the Add-on called generate_entities: 'false' or true
DockerUse the env. var. HASS_GEN_ENTITIES=False or True
DevelopmentIn the daemon_config.json set the "generate_entities": false or true