mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 03:57:27 +00:00
feat(essentials): Adds IEnvironmentalControls interface and updates some room config properties
This commit is contained in:
parent
8945398cd7
commit
e152250363
4 changed files with 46 additions and 1 deletions
|
|
@ -11,6 +11,8 @@ using PepperDash.Essentials.Core.Config;
|
|||
using PepperDash.Essentials.Core.Devices;
|
||||
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
|
|
@ -18,6 +20,8 @@ namespace PepperDash.Essentials.Core
|
|||
/// </summary>
|
||||
public abstract class EssentialsRoomBase : ReconfigurableDevice, IEssentialsRoom
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
@ -35,6 +39,16 @@ namespace PepperDash.Essentials.Core
|
|||
|
||||
public bool OccupancyStatusProviderIsRemote { get; private set; }
|
||||
|
||||
public List<EssentialsDevice> EnvironmentalControlDevices { get; protected set; }
|
||||
|
||||
public bool HasEnvironmentalControlDevices
|
||||
{
|
||||
get
|
||||
{
|
||||
return EnvironmentalControlDevices != null && EnvironmentalControlDevices.Count > 0;
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract Func<bool> IsWarmingFeedbackFunc { get; }
|
||||
protected abstract Func<bool> IsCoolingFeedbackFunc { get; }
|
||||
|
||||
|
|
@ -119,6 +133,9 @@ namespace PepperDash.Essentials.Core
|
|||
public EssentialsRoomBase(DeviceConfig config)
|
||||
: base(config)
|
||||
{
|
||||
|
||||
|
||||
|
||||
// Setup the ShutdownPromptTimer
|
||||
ShutdownPromptTimer = new SecondsCountdownTimer(Key + "-offTimer");
|
||||
ShutdownPromptTimer.IsRunningFeedback.OutputChange += (o, a) =>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace PepperDash.Essentials.Core
|
|||
/// <summary>
|
||||
/// Describes the basic functionality of an EssentialsRoom
|
||||
/// </summary>
|
||||
public interface IEssentialsRoom : IKeyName, IReconfigurableDevice, IRunDefaultPresentRoute
|
||||
public interface IEssentialsRoom : IKeyName, IReconfigurableDevice, IRunDefaultPresentRoute, IEnvironmentalControls
|
||||
{
|
||||
BoolFeedback OnFeedback { get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
using PepperDash.Core;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
|
|
@ -66,6 +68,14 @@ namespace PepperDash.Essentials.Core
|
|||
bool RunDefaultCallRoute();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes environmental controls available on a room such as lighting, shades, temperature, etc.
|
||||
/// </summary>
|
||||
public interface IEnvironmentalControls
|
||||
{
|
||||
List<EssentialsDevice> EnvironmentalControlDevices { get; }
|
||||
|
||||
bool HasEnvironmentalControlDevices { get; }
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue