mirror of
https://github.com/home-assistant/core.git
synced 2025-04-27 18:57:57 +00:00
Fix unit log message (#2823)
* Fix log message for deprecated temp key * Use string formatting and pass constant variables as arguments in log message to show correct name of config keys. * Fix import order
This commit is contained in:
parent
7594cf3c94
commit
9afb1d8c0d
@ -267,8 +267,9 @@ def process_ha_core_config(hass, config):
|
|||||||
else:
|
else:
|
||||||
hac.units = IMPERIAL_SYSTEM
|
hac.units = IMPERIAL_SYSTEM
|
||||||
_LOGGER.warning("Found deprecated temperature unit in core config, "
|
_LOGGER.warning("Found deprecated temperature unit in core config, "
|
||||||
"expected unit system. Replace 'temperature: %s' with "
|
"expected unit system. Replace '%s: %s' with "
|
||||||
"'unit_system: %s'", unit, hac.units.name)
|
"'%s: %s'", CONF_TEMPERATURE_UNIT, unit,
|
||||||
|
CONF_UNIT_SYSTEM, hac.units.name)
|
||||||
|
|
||||||
# Shortcut if no auto-detection necessary
|
# Shortcut if no auto-detection necessary
|
||||||
if None not in (hac.latitude, hac.longitude, hac.units,
|
if None not in (hac.latitude, hac.longitude, hac.units,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"""YAML utility functions."""
|
"""YAML utility functions."""
|
||||||
|
import glob
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from typing import Union, List, Dict
|
from typing import Union, List, Dict
|
||||||
|
|
||||||
import glob
|
|
||||||
import yaml
|
import yaml
|
||||||
try:
|
try:
|
||||||
import keyring
|
import keyring
|
||||||
|
Loading…
x
Reference in New Issue
Block a user