Darksky enhancements (#9851)
* Correct capitalization inconsistency in DarkSky
All two-word sensors ("Precip Intensity," "Nearest Storm Bearing," etc) in Darksky uses title case for the friendly name of the sensor, with the exception of "Dew point."
* Implement UV Index in Darksky
* Fixed whitespace for Tox compliance
* Add unit for UV Index.
Per recommendation of reviewer, added 'UV Index' as a CONST in const.py, then used that const in both DarkSky and ISY994. It looks like BloomSky might also support UV Index and it should probably be standardized.
This commit is contained in:
1 parent
fd6c2598a7
commit
f807a3a890
3 files changed
+12
-5
No files matched your search
@@ -9,7 +9,7 @@ from typing import Callable # noqa
|
||||
|
||||
import homeassistant.components.isy994 as isy
|
||||
from homeassistant.const import (
|
||||
TEMP_CELSIUS, TEMP_FAHRENHEIT, STATE_OFF, STATE_ON)
|
||||
TEMP_CELSIUS, TEMP_FAHRENHEIT, STATE_OFF, STATE_ON, UNIT_UV_INDEX)
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@@ -77,7 +77,7 @@ UOM_FRIENDLY_NAME = {
|
||||
'64': 'shindo',
|
||||
'65': 'SML',
|
||||
'69': 'gal',
|
||||
'71': 'UV index',
|
||||
'71': UNIT_UV_INDEX,
|
||||
'72': 'V',
|
||||
'73': 'W',
|
||||
'74': 'W/m²',
|
||||
|
||||
Reference in new issue
Block a user