Additional updates to allow occupancy sensor to be cleared when room not active

This commit is contained in:
Neil Dorin
2023-07-19 16:22:20 -06:00
parent a787be6ccc
commit f73d6994b8
3 changed files with 15 additions and 2 deletions

View File

@@ -393,6 +393,11 @@ namespace PepperDash.Essentials
// Stop listining to this event when room deactivated
VideoCodec.IsReadyChange -= VideoCodec_IsReadyChange;
// Clear occupancy
RoomOccupancy = null;
Debug.Console(0, this, "Room '{0}' Deactivated", Name);
return base.Deactivate();
}
@@ -488,6 +493,8 @@ namespace PepperDash.Essentials
Debug.Console(0, this, "Error Activiating Room: {0}", e);
}
Debug.Console(0, this, "Room '{0}' Activated", Name);
return base.CustomActivate();
}

View File

@@ -293,6 +293,11 @@ namespace PepperDash.Essentials
// Stop listining to this event when room deactivated
VideoCodec.IsReadyChange -= VideoCodec_IsReadyChange;
// Clear occupancy
RoomOccupancy = null;
Debug.Console(0, this, "Room '{0}' Deactivated", Name);
return base.Deactivate();
}
@@ -406,7 +411,8 @@ namespace PepperDash.Essentials
{
Debug.Console(0, this, "Error Activiating Room: {0}", e);
}
Debug.Console(0, this, "Room '{0}' Activated", Name);
return base.CustomActivate();
}

View File

@@ -35,7 +35,7 @@ namespace PepperDash.Essentials.Core
public BoolFeedback IsWarmingUpFeedback { get; private set; }
public BoolFeedback IsCoolingDownFeedback { get; private set; }
public IOccupancyStatusProvider RoomOccupancy { get; private set; }
public IOccupancyStatusProvider RoomOccupancy { get; protected set; }
public bool OccupancyStatusProviderIsRemote { get; private set; }