Minor updates (#16106)

This commit is contained in:
Fabian Affolter authored and GitHub committed 2018-08-21 21:25:16 +02:00
1 parent 1ce51bfbd6
commit 0e1fb74e1b
20 files changed
+172 -180

No files matched your search

+5 -4
View File
@@ -5,8 +5,9 @@ For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.homematic/
"""
import logging
from homeassistant.components.homematic import ATTR_DISCOVER_DEVICES, HMDevice
from homeassistant.const import STATE_UNKNOWN
from homeassistant.components.homematic import HMDevice, ATTR_DISCOVER_DEVICES
_LOGGER = logging.getLogger(__name__)
@@ -70,7 +71,7 @@ HM_ICON_HA_CAST = {
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the HomeMatic platform."""
"""Set up the HomeMatic sensor platform."""
if discovery_info is None:
return
@@ -83,7 +84,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class HMSensor(HMDevice):
"""Represents various HomeMatic sensors in Home Assistant."""
"""Representation of a HomeMatic sensor."""
@property
def state(self):
@@ -111,4 +112,4 @@ class HMSensor(HMDevice):
if self._state:
self._data.update({self._state: STATE_UNKNOWN})
else:
_LOGGER.critical("Can't initialize sensor %s", self._name)
_LOGGER.critical("Unable to initialize sensor: %s", self._name)
@@ -1,18 +1,17 @@
"""
Support for HomematicIP sensors.
Support for HomematicIP Cloud sensors.
For more details about this component, please refer to the documentation at
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.homematicip_cloud/
"""
import logging
from homeassistant.components.homematicip_cloud import (
HomematicipGenericDevice, DOMAIN as HMIPC_DOMAIN,
HMIPC_HAPID)
HMIPC_HAPID, HomematicipGenericDevice)
from homeassistant.components.homematicip_cloud import DOMAIN as HMIPC_DOMAIN
from homeassistant.const import (
TEMP_CELSIUS, DEVICE_CLASS_TEMPERATURE, DEVICE_CLASS_HUMIDITY,
DEVICE_CLASS_ILLUMINANCE)
DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_ILLUMINANCE, DEVICE_CLASS_TEMPERATURE,
TEMP_CELSIUS)
_LOGGER = logging.getLogger(__name__)
@@ -25,14 +24,14 @@ ATTR_TEMPERATURE_OFFSET = 'temperature_offset'
ATTR_HUMIDITY = 'humidity'
async def async_setup_platform(hass, config, async_add_devices,
discovery_info=None):
"""Set up the HomematicIP sensors devices."""
async def async_setup_platform(
hass, config, async_add_devices, discovery_info=None):
"""Set up the HomematicIP Cloud sensors devices."""
pass
async def async_setup_entry(hass, config_entry, async_add_devices):
"""Set up the HomematicIP sensors from a config entry."""
"""Set up the HomematicIP Cloud sensors from a config entry."""
from homematicip.device import (
HeatingThermostat, TemperatureHumiditySensorWithoutDisplay,
TemperatureHumiditySensorDisplay, MotionDetectorIndoor)
@@ -54,7 +53,7 @@ async def async_setup_entry(hass, config_entry, async_add_devices):
class HomematicipAccesspointStatus(HomematicipGenericDevice):
"""Representation of an HomeMaticIP access point."""
"""Representation of an HomeMaticIP Cloud access point."""
def __init__(self, home):
"""Initialize access point device."""
@@ -82,7 +81,7 @@ class HomematicipAccesspointStatus(HomematicipGenericDevice):
class HomematicipHeatingThermostat(HomematicipGenericDevice):
"""MomematicIP heating thermostat representation."""
"""Represenation of a HomematicIP heating thermostat device."""
def __init__(self, home, device):
"""Initialize heating thermostat device."""
@@ -115,7 +114,7 @@ class HomematicipHeatingThermostat(HomematicipGenericDevice):
class HomematicipHumiditySensor(HomematicipGenericDevice):
"""MomematicIP humidity device."""
"""Represenation of a HomematicIP Cloud humidity device."""
def __init__(self, home, device):
"""Initialize the thermometer device."""
@@ -138,7 +137,7 @@ class HomematicipHumiditySensor(HomematicipGenericDevice):
class HomematicipTemperatureSensor(HomematicipGenericDevice):
"""MomematicIP the thermometer device."""
"""Representation of a HomematicIP Cloud thermometer device."""
def __init__(self, home, device):
"""Initialize the thermometer device."""
@@ -161,7 +160,7 @@ class HomematicipTemperatureSensor(HomematicipGenericDevice):
class HomematicipIlluminanceSensor(HomematicipGenericDevice):
"""MomematicIP the thermometer device."""
"""Represenation of a HomematicIP Illuminance device."""
def __init__(self, home, device):
"""Initialize the device."""