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

Weather temperature always displays °C regardless of unit of measurement. #86

Closed
ohgodbees opened this issue Feb 24, 2022 · 1 comment
Assignees
Labels
bug Something isn't working T-Shirt-Size: S
Milestone

Comments

@ohgodbees
Copy link

I have set up the plugin to call the weather (domain) and openweathermap (entity), and it gets the temperature correctly but display the temperature value as being celsius and ignores the unit of measurement. This only seems to happen with openweathermap as I have another sensor that shows correctly with °F after the value.

When I call the API directly (A GET call to /api/states) it displays the right information:

{ "entity_id": "sensor.openweathermap_temperature", "state": "27.5", "attributes": { "state_class": "measurement", "unit_of_measurement": "°F", "attribution": "Data provided by OpenWeatherMap", "device_class": "temperature", "friendly_name": "OpenWeatherMap Temperature" },

It actually displays the correct temperature, it just puts °C after it on the Stream Deck:

image

@cgiesche cgiesche added bug Something isn't working T-Shirt-Size: S labels Feb 28, 2022
@cgiesche
Copy link
Owner

cgiesche commented Feb 28, 2022

Thank you for your feedback.

It is a hardcoded problem and should be easy to solve:

customizableDefaultConfig.templates.push("{{temperature}}°C", "{{humidity}}%")

Hint: Attribute "unit_of_measurement" may not always be present!

@cgiesche cgiesche added this to the Release 2.1 milestone Apr 1, 2022
@cgiesche cgiesche self-assigned this May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working T-Shirt-Size: S
Projects
None yet
Development

No branches or pull requests

2 participants