fix: guard PartitionPresent getter against null sensor feedback

EssentialsPartitionController.PartitionPresent threw a NullReferenceException in Auto mode when the partition sensor's PartitionPresentFeedback was not yet initialized, breaking combiner fullStatus serialization to MC clients. Fall back to the last-known _partitionPresent value instead of dereferencing a null sensor feedback.
This commit is contained in:
equinoy 2026-07-14 19:48:32 -05:00
parent b499097448
commit 707195b8c5

View file

@ -30,7 +30,7 @@ namespace PepperDash.Essentials.Core
{
if (IsInAutoMode)
{
return _partitionSensor.PartitionPresentFeedback.BoolValue;
return _partitionSensor?.PartitionPresentFeedback?.BoolValue ?? _partitionPresent;
}
return _partitionPresent;