-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for floors and labels to the ServiceTarget class (#1084)
* Added support for floors and labels to the ServiceTarget class * Added tests * Removed all Focus attributes from debug project * Removed the focus attribute for registry app as well
- Loading branch information
1 parent
917adf5
commit f3c00df
Showing
11 changed files
with
101 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Reactive.Linq; | ||
using Microsoft.Extensions.Logging; | ||
using NetDaemon.AppModel; | ||
using NetDaemon.HassModel; | ||
using NetDaemon.HassModel.Entities; | ||
namespace Apps; | ||
|
||
[NetDaemonApp] | ||
public sealed class RegistryApp | ||
{ | ||
public RegistryApp(IHaRegistry haRegistry, IHaContext ha) | ||
{ | ||
// var floor = haRegistry.GetFloor("upstairs"); | ||
// var upstairsAreas = floor.Areas; | ||
// var upstairsBooleans = upstairsAreas | ||
// .SelectMany(n => n.Entities | ||
// .Where(x => x.EntityId.StartsWith("input_boolean."))); | ||
// | ||
// upstairsBooleans.ToList().ForEach(x => x.CallService("toggle")); | ||
ha.CallService("input_boolean", "toggle", new ServiceTarget{ FloorIds = ["upstairs"] }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters