Releases: net-daemon/netdaemon
0.3.2-alpha Release
This release is alot of logging and some stability fixes for NetDaemon.
- New logging using Serilog, sadly Serilog does not support coloring on add-on but when providing the -t to docker run colors will be shown for docker users. see docker install instructions
- New version of HassClient that makes it possible to add logging of messages for debugging
- Loglevel can now be set on docker containers using environment var.
- Application name are shown i logging from user apps when using the Log command.
- Specific LogWarning, LogError etc. is now provided for more readable code. All Log use aspnet logging style
Log("Hello {name}", namevar);
do not use"Log($"Hello {namevar}")
since you miss out on strucured logging provided by ILogger interface and Serilog.
0.3.1-alpha Release
Bugfix for dependent apps not working properly
Get application instance and application dependencies
This releas makes the NetDaemon support to get singleton references to other running instances of an app.
var lightManagerApp = GetApp("light_manager");
this also requires support to do dependencies in yaml config
app:
class: MyApp
dependencies:
- light_manager
Camera fluent API support
In the effort to get more specific support for enitity domains in the fluent api, the camera is now added. Also it is first of many refactorings of the fluent API to make it simpler and easier to maintain.
The autogenerated camera entities will now use this interface instead.
Sample below:
await Camera("camera.camera1")
.Snapshot("/config/www/snapshots/cam1.jpg")
.ExecuteAsync();
0.3.0-alpha Release
Get application instance and application dependencies
This releas makes the NetDaemon support to get singleton references to other running instances of an app.
var lightManagerApp = GetApp("light_manager");
this also requires support to do dependencies in yaml config
app:
class: MyApp
dependencies:
- light_manager
Camera fluent API support
In the effort to get more specific support for enitity domains in the fluent api, the camera is now added. Also it is first of many refactorings of the fluent API to make it simpler and easier to maintain.
The autogenerated camera entities will now use this interface instead.
Sample below:
await Camera("camera.camera1")
.Snapshot("/config/www/snapshots/cam1.jpg")
.ExecuteAsync();
0.2.3-alpha Release
Adding the generated files in apps
folder as _EntityExtensions.cs. You might need to delete old generated files undder .generated
folder
0.2.2-alpha Release
First experimental feature for #53 , Generate entities
If the environvariable HASS_GEN_ENTITIES set to "True" then the daemon will generate entities from your Home Assistant. This feature will generate only supported entity types in the Fluent API. Basically On/Off/Toggle entities and Media Players. More will follow.
Home Assistant add-on will have a settings corresponding to this settings.
All generated files will be under [appfolder]/.generated
Classes is partial but all files under .generated will be written over.
0.2.1-alpha Release
Much improved error logging in
- Calls
- Scheduled actions
0.1.45-alpha
DelayUntilStateChange support
The API both fluent and normal API gets the possibility to wait for a state change. This required also to support cancelation of listen events. This means that you now also can cancel any WhenStateChange or ListenEvent calls in your own apps.
code example of normal API
await DelayUntilStateChange("input_boolean.checkitout", to: "on").Task;
The returned type is a object where you use it to wait and use own time out. When that return object is disposed it will cancel the task but you can also cancel yourself.
using var stateChangeDelay = DelayUntilStateChange("input_boolean.checkitout", to: "on").Task;
var resultTask = await Task.WhenAny(stateChangeDelay.Task, new CancellationTokenSource(TimeSpan.FromHours(1)).Token.AsTask());
if (resultTask.IsCanceled)
{
// Ops the state did not change within the hour
}
else
{
// Yay the state changed
}
Fluent API example
await Entity("binary_sensor.pir")
.DelayUntilStateChange((to, _) => to?.State == "on").Task;
Fixes #22
0.1.43-alpha
Great release today!
Docker support
Thanks to @Horizon0156 can we now deploy NetDaemon through docker if you do not have add-on support and running Home Assistant Core
Discovery and reload
Apps can is now discovered and show as entities "netdaemon.[appname]" and show on or off. You can now turn off and on and call the netdaemon.reload_apps
service. Important! This require that you use the custom control for netdameon. https://github.com/net-daemon/netdaemon/tree/dev/custom_components/netdaemon.
We also have @Horizon0156 to thank for his hard work on this one!
0.1.42-alpha
First release that is tracked here. This release is corresponding to the nuget package version.
Fixes
- The internal URL has changed in Home Assistant (Hass.Io before) add-on so the SetState stopped working
Addon version
- 0.0.34