Compare commits

...

6 Commits

Author SHA1 Message Date
Paulus Schoutsen f79d762e66 Merge pull request #3585 from home-assistant/hotfix-29-2
Hotfix 29 2
2016-09-29 08:18:51 -07:00
Paulus Schoutsen 30aa67b789 Version bump to 0.29.2 2016-09-29 07:50:34 -07:00
Hugo Dupras 883e45c476 Netatmo: Hotfix for hass 0.29 (#3576)
Signed-off-by: Hugo D. (jabesq) <jabesq@gmail.com>
2016-09-29 07:46:04 -07:00
Fabian Affolter 47a3adb6b3 Remove duplicate port entry (fixes #3583) (#3584) 2016-09-29 07:45:39 -07:00
Paulus Schoutsen f3d838c448 Version bump to 0.29.1 2016-09-28 22:08:02 -07:00
Marcelo Moreira de Mello 574e3231d0 Fixed typo (#3569)
Sep 29 00:59:22 pi hass[21333]: if self.device.measurment_scale == 'F':
Sep 29 00:59:22 pi hass[21333]: AttributeError: 'Device' object has no attribute 'measurment_scale'
2016-09-28 22:07:40 -07:00
5 changed files with 14 additions and 12 deletions
+7 -3
View File
@@ -36,10 +36,14 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup access to Netatmo Welcome cameras."""
netatmo = get_component('netatmo')
home = config.get(CONF_HOME)
data = WelcomeData(netatmo.NETATMO_AUTH, home)
import lnetatmo
try:
data = WelcomeData(netatmo.NETATMO_AUTH, home)
except lnetatmo.NoDevice:
return None
for camera_name in data.get_camera_names():
if CONF_CAMERAS in config:
if config[CONF_CAMERAS] != []:
if camera_name not in config[CONF_CAMERAS]:
continue
add_devices([WelcomeCamera(data, camera_name, home)])
@@ -49,7 +53,7 @@ class WelcomeCamera(Camera):
"""Representation of the images published from Welcome camera."""
def __init__(self, data, camera_name, home):
"""Setup for access to the BloomSky camera images."""
"""Setup for access to the Netatmo camera images."""
super(WelcomeCamera, self).__init__()
self._data = data
self._camera_name = camera_name
+1 -1
View File
@@ -57,7 +57,7 @@ class NestThermostat(ClimateDevice):
@property
def unit_of_measurement(self):
"""Return the unit of measurement."""
if self.device.measurment_scale == 'F':
if self.device.measurement_scale == 'F':
return TEMP_FAHRENHEIT
elif self.device.measurement_scale == 'C':
return TEMP_CELSIUS
+1 -2
View File
@@ -38,8 +38,7 @@ CONFIG_SCHEMA = vol.Schema({
vol.All(cv.ensure_list, [cv.entity_id]),
vol.Optional(CONF_DB_NAME, default=DEFAULT_DATABASE): cv.string,
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
vol.Optional(CONF_PORT, default=False): cv.boolean,
vol.Optional(CONF_SSL, default=False): cv.boolean,
vol.Optional(CONF_SSL, default=DEFAULT_SSL): cv.boolean,
vol.Optional(CONF_TAGS, default={}):
vol.Schema({cv.string: cv.string}),
vol.Optional(CONF_WHITELIST, default=[]):
+4 -5
View File
@@ -21,7 +21,6 @@ _LOGGER = logging.getLogger(__name__)
ATTR_MODULE = 'modules'
CONF_MODULES = 'modules'
CONF_MODULE_NAME = 'module_name'
CONF_STATION = 'station'
DEPENDENCIES = ['netatmo']
@@ -50,7 +49,7 @@ SENSOR_TYPES = {
}
MODULE_SCHEMA = vol.Schema({
vol.Required(CONF_MODULE_NAME, default=[]):
vol.Required(cv.string, default=[]):
vol.All(cv.ensure_list, [vol.In(SENSOR_TYPES)]),
})
@@ -84,11 +83,11 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
# pylint: disable=too-few-public-methods
class NetAtmoSensor(Entity):
"""Implementation of a NetAtmo sensor."""
"""Implementation of a Netatmo sensor."""
def __init__(self, netatmo_data, module_name, sensor_type):
"""Initialize the sensor."""
self._name = 'NetAtmo {} {}'.format(module_name,
self._name = 'Netatmo {} {}'.format(module_name,
SENSOR_TYPES[sensor_type][0])
self.netatmo_data = netatmo_data
self.module_name = module_name
@@ -232,7 +231,7 @@ class NetAtmoData(object):
@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):
"""Call the NetAtmo API to update the data."""
"""Call the Netatmo API to update the data."""
import lnetatmo
dev_list = lnetatmo.DeviceList(self.auth)
+1 -1
View File
@@ -2,7 +2,7 @@
"""Constants used by Home Assistant components."""
MAJOR_VERSION = 0
MINOR_VERSION = 29
PATCH_VERSION = '0'
PATCH_VERSION = '2'
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
REQUIRED_PYTHON_VER = (3, 4, 2)