Fix implicit-return in homematic (#122922)

This commit is contained in:
epenet 2024-08-08 16:32:46 +02:00 committed by GitHub
parent baceb2a92a
commit a406068f13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -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."""
@ -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

View File

@ -125,6 +125,7 @@ class HMThermostat(HMDevice, ClimateEntity):
for node in HM_HUMI_MAP:
if node in self._data:
return self._data[node]
return None
@property
def current_temperature(self):
@ -132,6 +133,7 @@ class HMThermostat(HMDevice, ClimateEntity):
for node in HM_TEMP_MAP:
if node in self._data:
return self._data[node]
return None
@property
def target_temperature(self):