Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions homeassistant/components/binary_sensor/homematic.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Support for Homematic binary sensors.
Support for HomeMatic binary sensors.

For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.homematic/
Expand Down Expand Up @@ -29,7 +29,7 @@


def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the Homematic binary sensor platform."""
"""Set up the HomeMatic binary sensor platform."""
if discovery_info is None:
return

Expand All @@ -43,7 +43,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):


class HMBinarySensor(HMDevice, BinarySensorDevice):
"""Representation of a binary Homematic device."""
"""Representation of a binary HomeMatic device."""

@property
def is_on(self):
Expand All @@ -54,16 +54,14 @@ def is_on(self):

@property
def device_class(self):
"""Return the class of this sensor, from DEVICE_CLASSES."""
# If state is MOTION (RemoteMotion works only)
"""Return the class of this sensor from DEVICE_CLASSES."""
# If state is MOTION (Only RemoteMotion working)
if self._state == 'MOTION':
return 'motion'
return SENSOR_TYPES_CLASS.get(self._hmdevice.__class__.__name__, None)

def _init_data_struct(self):
"""Generate a data struct (self._data) from the Homematic metadata."""
# add state to data struct
"""Generate the data dictionary (self._data) from metadata."""
# Add state to data struct
if self._state:
_LOGGER.debug("%s init datastruct with main node '%s'", self._name,
self._state)
self._data.update({self._state: STATE_UNKNOWN})
7 changes: 3 additions & 4 deletions homeassistant/components/cover/homematic.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
The homematic cover platform.
The HomeMatic cover platform.

For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/cover.homematic/
Expand Down Expand Up @@ -29,7 +29,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):


class HMCover(HMDevice, CoverDevice):
"""Representation a Homematic Cover."""
"""Representation a HomeMatic Cover."""

@property
def current_cover_position(self):
Expand Down Expand Up @@ -70,7 +70,6 @@ def stop_cover(self, **kwargs):
self._hmdevice.stop(self._channel)

def _init_data_struct(self):
"""Generate a data dict (self._data) from hm metadata."""
# Add state to data dict
"""Generate a data dictoinary (self._data) from metadata."""
self._state = "LEVEL"
self._data.update({self._state: STATE_UNKNOWN})
Loading