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 0ec6de3d66
commit 5a30461eaf

View file

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