Skip to content

Temperature range does not work in Fahrenheit #21

@Big-Tree

Description

@Big-Tree

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

The temperature unit of the temperature range is locked to Celsius. This is because if the temperature units of home assistant are set to Fahrenheit, the temperature range 0°C - 4°C is converted to 32°F - 39°F. It should be 0°F - 7.2°F.

The lock is enforced by setting device_class to None:

OptisparkNumber(
coordinator=coordinator,
entity_description=NumberEntityDescription(
key="temperature_range",
name="Temperature Range",
icon="mdi:gauge"),
native_value=3,
native_step=0.5,
native_max_value=4,
native_min_value=0,
lambda_parameter=const.LAMBDA_TEMP_RANGE,
device_class=None,
native_unit_of_measurement='°C'
)

Describe the solution you'd like

When home assistant temperature units are set to Fahrenheit, the temperature range should be converted to a sensible range in Fahrenheit, such as 0°F - 7°F with a step size of 1°F.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions