fix(cooling): keep units on readings even when tags are unreadable#118
Merged
mukama merged 1 commit intoJul 2, 2026
Merged
Conversation
getSensorReading and getSensorWithTag now return { value: null, unit }
when a configured sensor is present in the snap but its tag isn't
readable (offline devices are still emitted), instead of collapsing to
null and dropping the unit; they return null only when no sensor is
configured. Also surface makeup pump speed/current and return it by
config id so it is present with null values when offline.
tekwani
approved these changes
Jul 2, 2026
boris91
approved these changes
Jul 2, 2026
mukama
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #117 — extends "keep the sensor when unreadable" to units across all cooling views, so the response is shape-complete even when the DCS is offline.
getSensorReadingandgetSensorWithTagnow return{ value: null, unit }when a configured sensor is present in the snap but its tag isn't readable (the worker still emits offline devices withvalue: null+ unit), instead of collapsing tonulland dropping the unit. They returnnullonly when no sensor is configured. This cascades through every scalar/summary/card field that flows through these helpers — line temps/pressures/flows, HVAC supply/return, chiller water sides, buffer/tank levels, condenser temps, etc.speed/current(units included) and is returned by config id, so it's present with null values when offline.Agreed contract: when a tag is unreadable,
value: nullbut unit + sensor + all constant info are retained; a field isnullonly when no sensor is configured.Verified against the mock (simulated offline): sensor-backed fields return
{ value: null, unit, [sensor] }; unconfigured fields stay null. Lint + unit tests pass (1191).