Skip to content

Conversation

@gemini86
Copy link

Description

The tank gauge looks so great, yet offers the least flexibility in value rendering. I suggest fixing this.

  • Removed automatic conversion of the incoming msg.payload to a percentage of min/max. The gauge background wave animation already indicates this.
  • Restored options for prefix and suffix display. Now the water tank and display units like 'liters' or 'gallons', which is very useful in an industrial HMI.

Notes:

  • Documentation on water type gauge is basically not there, so this change actually makes the gauge perform in a way more in line with the current documentation.
  • I have tested within node-red locally to verify functionality.

Related Issue(s)

#1495
#1275

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

- removed automatic percentage calculation
- added options for prefix and suffix display
@colinl
Copy link
Collaborator

colinl commented Dec 14, 2025

This needs to be conditional, so the user can select % or value, otherwise it will break the dashboard for existing users who expect, and want, a % value.
Ideally the option should be present on all gauge types.

@gemini86
Copy link
Author

This needs to be conditional, so the user can select % or value, otherwise it will break the dashboard for existing users who expect, and want, a % value. Ideally the option should be present on all gauge types.

I originally did intend to do this but thought it would be worth discussion.

Currently, the user is configuring a value type with the typedInput dropdown. If they have configured, EG, msg.payload.abc, but we now go and introduce a "percentage" dropdown option which becomes the default, their configuration will be dropped because we cannot know what property they're passing in as a value. For that reason, I think the percentage option should be an additional checkbox which is checked by default on tank and battery gauges.

@colinl
Copy link
Collaborator

colinl commented Dec 14, 2025

I think the percentage option should be an additional checkbox which is checked by default on tank and battery gauges.

Absolutely. That is what I assumed would be the case. Then it will display the value (wherever it comes from) as a number or as a percentage of range.

- enabled by default when gauge type is 'gauge-tank' to mimic original behavior
- option is available for all gauge types, but not the default for others
@gemini86
Copy link
Author

pushed some changes which add a checkbox for displaying value as percent- but this is only checked by default for the 'tank' type gauge, others uncheck by default.

It would really be my personal preference not to have checkboxes checking and unchecking themselves but if we really see displaying the actual value by default a "breaking change" (subjective I think) then I see no other way around this.

@colinl
Copy link
Collaborator

colinl commented Dec 14, 2025

I think it is only when a user has a tank on his dashboard and upgrades to the latest version that the current default must be used, so the display does not change when he upgrades. If a new tank is added then probably it would be ok for it to default to value rather than %. @Steve-Mcl might have thoughts on this though.

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.

2 participants