Skip to content

Configurable Unit of Measurement #133

Closed

Description

@Nubosch

What problem does this solve?

Setting the Unit of Measurement for setpoint and output currently seems impossible in the UI. The history-graph card groups values by unit. This leads to quite confusing visualizations, the values get mixed together into one graph, especially when overlaying multiple PIDs in one history view.

Proposed solution

Removing the % in #124 was a good decision, since it doesn't fit everybody. Allowing to configure it, may make everybody happy. For now I stick to editing the core configuration by hand.

Alternatives considered

No response

Additional context

No response

Checklist

  • I have searched existing issues and this is not a duplicate

Activity

  1. bvweerd commented on Apr 9, 2026

    @bvweerd
    Owner

    Hi,

    Thanks for your contribution.

    Home assistant does not allow to configure the unit of a sensor in the config or options flow, see https://developers.home-assistant.io/blog/2022/12/07/unit_system_changes/.

    In the case you would like to have a unit conversion without changing the code, please use a template helper sensor.

  2. Nubosch commented on Apr 10, 2026

    @Nubosch
    Author

    Many thanks for your fast response.

    Maybe I was talking more about the device_class than the unit of measurement itself. I got confused since the UI did not contain any user modifiable unit. The number integration itself supports device_class, afaik. Why I set it for many of my own number entities, resulting in user/display choices for the unit. Having some way to tell HA how to treat the numbers from the PIDs would be nice, but I can find my way around it. Thanks for your suggestion.

    Note: following customization gives the desired result for me

    configuration.yaml

    homeassistant:
      customize: !include customize.yaml

    customize.yaml

    number.setpoint_hcd_ground_floor_pid_01:
      device_class: temperature
      unit_of_measurement: C°
  3. bvweerd commented on Apr 11, 2026

    @bvweerd
    Owner

    Thanks for elaborating, I've added your approach to the readme!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions