mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
Set event to not be acknowledgable
Added logic to acknowledge event Added debug statement to show that event was being fired
This commit is contained in:
@@ -169,10 +169,15 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
void FeatureEventGroup_UserGroupCallBack(ScheduledEvent SchEvent, ScheduledEventCommon.eCallbackReason type)
|
void FeatureEventGroup_UserGroupCallBack(ScheduledEvent SchEvent, ScheduledEventCommon.eCallbackReason type)
|
||||||
{
|
{
|
||||||
|
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "{0}:{1} @ {2}", SchEvent.Name, type, DateTime.Now);
|
||||||
|
|
||||||
if (type == ScheduledEventCommon.eCallbackReason.NormalExpiration)
|
if (type == ScheduledEventCommon.eCallbackReason.NormalExpiration)
|
||||||
{
|
{
|
||||||
|
SchEvent.Acknowledge();
|
||||||
|
|
||||||
if (SchEvent.Name == FeatureEnableEventName)
|
if (SchEvent.Name == FeatureEnableEventName)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (PropertiesConfig.EnableRoomOnWhenOccupied)
|
if (PropertiesConfig.EnableRoomOnWhenOccupied)
|
||||||
FeatureEnabled = true;
|
FeatureEnabled = true;
|
||||||
|
|
||||||
@@ -249,8 +254,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
// Set up its initial properties
|
// Set up its initial properties
|
||||||
|
|
||||||
if(!schEvent.Acknowledgeable)
|
schEvent.Acknowledgeable = false;
|
||||||
schEvent.Acknowledgeable = true;
|
|
||||||
|
|
||||||
if(!schEvent.Persistent)
|
if(!schEvent.Persistent)
|
||||||
schEvent.Persistent = true;
|
schEvent.Persistent = true;
|
||||||
@@ -287,7 +291,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
Debug.Console(1, this, "Event '{0}' Absolute time set to {1}", schEvent.Name, schEvent.DateAndTime.ToString());
|
Debug.Console(1, this, "Event '{0}' Absolute time set to {1}", schEvent.Name, schEvent.DateAndTime.ToString());
|
||||||
|
|
||||||
CalculateAndSetAcknowledgeExpirationTimeout(schEvent, FeatureEnabledTime, FeatureDisabledTime);
|
//CalculateAndSetAcknowledgeExpirationTimeout(schEvent, FeatureEnabledTime, FeatureDisabledTime);
|
||||||
|
|
||||||
schEvent.Recurrence.Weekly(eventRecurrennce);
|
schEvent.Recurrence.Weekly(eventRecurrennce);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user