Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temperature range does not work in Fahrenheit #21

Open
3 tasks done
Big-Tree opened this issue Dec 13, 2023 · 0 comments
Open
3 tasks done

Temperature range does not work in Fahrenheit #21

Big-Tree opened this issue Dec 13, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Big-Tree
Copy link
Owner

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

@Big-Tree Big-Tree added enhancement New feature or request help wanted Extra attention is needed labels Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant