This is how you use the auto generated entities in NetDaemon.
- Turn on enitity generation, You need to turn on generation of entities. If you run docker use the
HASS_GEN_ENTITIES=Trueenvironment var or if you use Home Assistant add-on use the setting
- Restart NetDaemon once for the entities to be generated.
- Two genreated files will be created. Use the new api in the file
_EntityExtensionsRx.csthat will be created in app folder.
- Inherit from
GeneratedAppBaseinstead of default
NetDaemonRxAppand add a
using Netdaemon.Generated.Reactive;to the app file.
Using the entities
Now you can do several things. All entities has TurnOn/TurnOff/Toggle. All other will inherit the service calls from the domain generated.
All services with a entity_id parameter will be added automatically. Rest you need to add. See examples below.