Skip to content

fix(cooling): keep units on readings even when tags are unreadable#118

Merged
mukama merged 1 commit into
tetherto:developfrom
paragmore:feat/cooling-units-on-null-readings
Jul 2, 2026
Merged

fix(cooling): keep units on readings even when tags are unreadable#118
mukama merged 1 commit into
tetherto:developfrom
paragmore:feat/cooling-units-on-null-readings

Conversation

@paragmore

Copy link
Copy Markdown
Contributor

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.

  • getSensorReading and getSensorWithTag now 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 with value: null + unit), instead of collapsing to null and dropping the unit. They return null only 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.
  • Makeup pump now surfaces 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: null but unit + sensor + all constant info are retained; a field is null only 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).

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.
@mukama mukama merged commit 47e1f6d into tetherto:develop Jul 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants