Skip to content

Commit

Permalink
Fix implicit-return in homematic (home-assistant#122922)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored Aug 8, 2024
1 parent baceb2a commit a406068
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions homeassistant/components/homematic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,8 @@ def _create_ha_id(name, channel, param, count):
if count > 1 and param is not None:
return f"{name} {channel} {param}"

raise ValueError(f"Unable to create unique id for count:{count} and param:{param}")


def _hm_event_handler(hass, interface, device, caller, attribute, value):
"""Handle all pyhomematic device events."""
Expand Down Expand Up @@ -621,3 +623,4 @@ def _device_from_servicecall(hass, service):
for devices in hass.data[DATA_HOMEMATIC].devices.values():
if address in devices:
return devices[address]
return None
2 changes: 2 additions & 0 deletions homeassistant/components/homematic/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,15 @@ def current_humidity(self):
for node in HM_HUMI_MAP:
if node in self._data:
return self._data[node]
return None

@property
def current_temperature(self):
"""Return the current temperature."""
for node in HM_TEMP_MAP:
if node in self._data:
return self._data[node]
return None

@property
def target_temperature(self):
Expand Down

0 comments on commit a406068

Please sign in to comment.