Open ZhuDaHai opened 3 months ago
Still broken in Core 2024.7.0
Still broken in Core 2024.7.1
Still broken in Core 2024.7.2
TBC: The System->General settings till show Celsius for the Unit System, but all the sensors temperatures show as Fahrenheit - even though they are set to return Celsius in their code.
Also, I tried setting my Country to Canada, which uses Metric, but that did not help at all.
Here is a comparison of core.conf from a HA server that I've had running and upgrading for many years now. Notice that it has both 'unit_system' and 'unit_system_v2' in its file:
{ "version": 1, "minor_version": 4, "key": "core.config", "data": { "latitude": 52.3731339, "longitude": 4.8903147, "elevation": 0, "unit_system": "metric", "location_name": "Home", "time_zone": "UTC", "external_url": null, "internal_url": null, "unit_system_v2": "metric", "language": "en", "radius": 100 } }
Here is the core.conf file from my new HA install that's been up and running for just a couple of months now (and is having the issue of not applying 'metric' to the temperatures on reboot as reported in this Issue:
{ "version": 1, "minor_version": 4, "key": "core.config", "data": { "latitude": 38.94120278562837, "longitude": -94.7130260921069, "elevation": 0, "unit_system_v2": "metric", "location_name": "Home", "time_zone": "America/Chicago", "external_url": null, "internal_url": null, "currency": "USD", "country": "CA", "language": "en", "radius": 100 } }
Notice that it does NOT have unit_system setting in the config and that unit_system_v2 is correctly set to 'metric'. However, if I reboot this HA install, it reverts back to Ferinheit (us_customary) on the sensors while still showing Celsius in System -> General
In unit_system.py I see:
But in core.py:
Shouldn't METRIC_SYSTEM be _CONF_UNIT_SYTEM_METRIC in core.py ?
I'll stop for now. I have no idea what I'm doing. I just want this fixed.
I'm about to edit .storage/core.conf and add:
"unit_system": "metric",
to it to see if that fixes the problem. YIPES!
Core 2024.7.3 still broken
And placing "unit_system": "metric",
in core.config did nothing. It just gets removed and the temperature values revert to Fahrenheit as before (even though "unit_system_v2" is set to "metric" in core.config
ARGH
Soo....after more digging I've found that the System Monitor Integration ALWAYS reports back Celsius regardless of the System->General Unit of Measurement settings. Odd
I've also found this to be an open issue since 2022 with the only resolution (hack) being to create a sensor template to recalculate the temperature back to C when the Unit_system/unit_system_v2 defaults somehow to F (for FAIL).
So, yeah, that what I did. Maybe within my lifetime this will be addressed and fixed in the code. ha
I have the same issue...
I need Celsius, after restart SOME sensors revert to Fahrenheit, not all of them. If I go into Settings > System > General > Unit System
and switch to US customary
, Update, then back to Metric, it resets everything to Celsius correctly but the result is the graph above.
Can anyone help here?
any updates?
The problem
I previously reported this in the operating-system Issue page #3442 and was told this was probably a Core issue. I find similar issues from 2022, closed and resolved in the Core, but it looks like its back again as I'm using Core 2024.6.4 So, here is the new Issue Report:
The System->General setting page defaults to Fahrenheit for my location. I prefer Celsius and so change it to that: When I click on Update the cards in the overview page update to Celsius as expected. When I restart/reboot HA, it reverts back to Fahrenheit. I tried adding this to configuration.yaml: Still reverted back to Fahrenheit after a reboot/restart of HA. All the temperature sensors are set to Celsius - example: And I even tried setting my Country to 'Canada', which uses Metric as the default. Still reverts back to Fahrenheit after a reboot/restart
What version of Home Assistant Core has the issue?
2024.6.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
none. On System-> General
Link to integration documentation on our website
No Integration, System -> General settings page
Diagnostics information
Not an integration
Example YAML snippet
Anything in the logs that might be useful for us?