-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exclude autogen code from Execute missing errs (#100)
- Loading branch information
1 parent
2da34f3
commit 04dacb0
Showing
2 changed files
with
97 additions
and
1 deletion.
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
95 changes: 95 additions & 0 deletions
95
tests/NetDaemon.Daemon.Tests/DaemonRunner/FaultyApp/ExecuteWarnings/_EntityExtensions.cs
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,95 @@ | ||
using JoySoftware.HomeAssistant.NetDaemon.Common; | ||
|
||
namespace Netdaemon.Generated.Extensions | ||
{ | ||
public static partial class EntityExtension | ||
{ | ||
public static LightEntities LightEx(this NetDaemonApp app) => new LightEntities(app); | ||
public static SwitchEntities SwitchEx(this NetDaemonApp app) => new SwitchEntities(app); | ||
public static SceneEntities SceneEx(this NetDaemonApp app) => new SceneEntities(app); | ||
public static ScriptEntities ScriptEx(this NetDaemonApp app) => new ScriptEntities(app); | ||
public static AutomationEntities AutomationEx(this NetDaemonApp app) => new AutomationEntities(app); | ||
public static MediaPlayerEntities MediaPlayerEx(this NetDaemonApp app) => new MediaPlayerEntities(app); | ||
public static CameraEntities CameraEx(this NetDaemonApp app) => new CameraEntities(app); | ||
} | ||
|
||
public partial class LightEntities | ||
{ | ||
private readonly NetDaemonApp _app; | ||
public LightEntities(NetDaemonApp app) | ||
{ | ||
_app = app; | ||
} | ||
|
||
public IEntity HallByra => _app.Entity("light.hall_byra"); | ||
|
||
} | ||
|
||
public partial class SwitchEntities | ||
{ | ||
private readonly NetDaemonApp _app; | ||
public SwitchEntities(NetDaemonApp app) | ||
{ | ||
_app = app; | ||
} | ||
|
||
public IEntity Switch7 => _app.Entity("switch.switch7"); | ||
|
||
} | ||
|
||
public partial class SceneEntities | ||
{ | ||
private readonly NetDaemonApp _app; | ||
public SceneEntities(NetDaemonApp app) | ||
{ | ||
_app = app; | ||
} | ||
|
||
public IEntity Dag => _app.Entity("scene.day"); | ||
|
||
} | ||
|
||
public partial class ScriptEntities | ||
{ | ||
private readonly NetDaemonApp _app; | ||
public ScriptEntities(NetDaemonApp app) | ||
{ | ||
_app = app; | ||
} | ||
|
||
public IEntity DayScene => _app.Entity("script.day_scene"); | ||
} | ||
|
||
public partial class AutomationEntities | ||
{ | ||
private readonly NetDaemonApp _app; | ||
public AutomationEntities(NetDaemonApp app) | ||
{ | ||
_app = app; | ||
} | ||
|
||
public IEntity SetThemeAtStartup => _app.Entity("automation.set_theme_at_startup"); | ||
} | ||
|
||
public partial class MediaPlayerEntities | ||
{ | ||
private readonly NetDaemonApp _app; | ||
public MediaPlayerEntities(NetDaemonApp app) | ||
{ | ||
_app = app; | ||
} | ||
|
||
public IMediaPlayer Tv => _app.MediaPlayer("media_player.tv"); | ||
} | ||
|
||
public partial class CameraEntities | ||
{ | ||
private readonly NetDaemonApp _app; | ||
public CameraEntities(NetDaemonApp app) | ||
{ | ||
_app = app; | ||
} | ||
|
||
public ICamera MyCamera => _app.Camera("camera.my_camera"); | ||
} | ||
} |