Files
Essentials/src/PepperDash.Essentials.Core/Lighting/Lighting Interfaces.cs
Andrew Welker e86ab8fa8b fix: update lighting interfaces & messenger
Added the `ILightingScenesDynamic` interface to add an event for devices that support retrieving scene data from the lighting system at runtime. Also added the `sortOrder` property for the `LightingScene` type to allow for control over the sort order of scenes on the UI
2025-04-14 10:45:43 -05:00

59 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
namespace PepperDash.Essentials.Core.Lighting
{
/// <summary>
/// Requirements for a device that implements lighting scene control
/// </summary>
public interface ILightingScenes
{
event EventHandler<LightingSceneChangeEventArgs> LightingSceneChange;
List<LightingScene> LightingScenes { get; }
void SelectScene(LightingScene scene);
LightingScene CurrentLightingScene { get; }
}
public interface ILightingScenesDynamic
{
event EventHandler LightingScenesUpdated;
}
/// <summary>
/// Requirements for a device that implements master raise/lower
/// </summary>
public interface ILightingMasterRaiseLower
{
void MasterRaise();
void MasterLower();
void MasterRaiseLowerStop();
}
/// <summary>
/// Requiremnts for controlling a lighting load
/// </summary>
public interface ILightingLoad
{
void SetLoadLevel(int level);
void Raise();
void Lower();
IntFeedback LoadLevelFeedback { get; }
BoolFeedback LoadIsOnFeedback { get; }
}
public class LightingSceneChangeEventArgs : EventArgs
{
public LightingScene CurrentLightingScene { get; private set; }
public LightingSceneChangeEventArgs(LightingScene scene)
{
CurrentLightingScene = scene;
}
}
}