Skip to content

Commit

Permalink
handle heatbox2
Browse files Browse the repository at this point in the history
  • Loading branch information
CFenner committed Jan 16, 2024
1 parent 956038b commit 41a3666
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion homeassistant/components/vicare/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def get_compressors(device: PyViCareDevice) -> list[PyViCareHeatingDeviceCompone
def get_serial(device_config: PyViCareDeviceConfig) -> str:
"""Return the serial number for a device config."""
# we cannot always use device_config.getConfig().serial as it returns the gateway serial for all connected devices
if device_config.getModel() == "Heatbox1":
if device_config.getModel() in ["Heatbox1", "Heatbox2_SRC"]:
return device_config.getConfig().serial
# we cannot always use device.getSerial() either as there is a different API endpoint used for gateways that does not provide the serial (yet)
return device_config.asAutoDetectDevice().getSerial()
Expand Down

0 comments on commit 41a3666

Please sign in to comment.