mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix implicit-return in homematic (#122922)
This commit is contained in:
parent
baceb2a92a
commit
a406068f13
@ -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
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user