1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Enforce entity attribute types

This commit is contained in:
Paulus Schoutsen
2016-01-17 17:50:20 -08:00
parent 06b4fcc2cf
commit a9c6f8c1d9
12 changed files with 36 additions and 35 deletions

View File

@@ -16,8 +16,8 @@ from homeassistant.helpers.entity import Entity
REQUIREMENTS = ['pyowm==2.3.0']
_LOGGER = logging.getLogger(__name__)
SENSOR_TYPES = {
'weather': ['Condition', ''],
'temperature': ['Temperature', ''],
'weather': ['Condition', None],
'temperature': ['Temperature', None],
'wind_speed': ['Wind speed', 'm/s'],
'humidity': ['Humidity', '%'],
'pressure': ['Pressure', 'mbar'],
@@ -71,7 +71,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
pass
if forecast == 1:
SENSOR_TYPES['forecast'] = ['Forecast', '']
SENSOR_TYPES['forecast'] = ['Forecast', None]
dev.append(OpenWeatherMapSensor(data, 'forecast', unit))
add_devices(dev)