From 95daafcd4679ddf7d45f4e7f200b8f8e18bdb01e Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 5 Dec 2024 16:07:23 +0100 Subject: [PATCH] Logging consistency changes * custom_components/daikin_onecta/climate.py: * custom_components/daikin_onecta/water_heater.py: --- custom_components/daikin_onecta/climate.py | 18 +++++++++--------- .../daikin_onecta/water_heater.py | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/custom_components/daikin_onecta/climate.py b/custom_components/daikin_onecta/climate.py index 1958ec3..e89dde2 100644 --- a/custom_components/daikin_onecta/climate.py +++ b/custom_components/daikin_onecta/climate.py @@ -170,7 +170,7 @@ def setpoint(self): if oo is not None: setpoint = oo["setpoints"].get(self._setpoint) _LOGGER.info( - "Device '%s': %s operation mode %s has setpoint %s", + "Device '%s' %s operation mode %s has setpoint %s", self._device.name, self._setpoint, operation_mode, @@ -191,7 +191,7 @@ def sensory_data(self, setpoint): if sensoryData is not None: sensoryData = sensoryData.get("value").get(setpoint) _LOGGER.info( - "Device '%s': %s sensoryData %s", + "Device '%s' %s sensoryData %s", self._device.name, setpoint, sensoryData, @@ -251,7 +251,7 @@ def get_current_temperature(self): if self._setpoint == "leavingWaterOffset" and lwsensor is not None: current_temp = lwsensor["value"] _LOGGER.info( - "Device '%s': %s current temperature '%s'", + "Device '%s' %s current temperature '%s'", self._device.name, self._setpoint, current_temp, @@ -266,7 +266,7 @@ def get_max_temp(self): else: max_temp = super().max_temp _LOGGER.info( - "Device '%s': %s max temperature '%s'", + "Device '%s' %s max temperature '%s'", self._device.name, self._setpoint, max_temp, @@ -281,7 +281,7 @@ def get_min_temp(self): else: min_temp = super().min_temp _LOGGER.info( - "Device '%s': %s min temperature '%s'", + "Device '%s' %s min temperature '%s'", self._device.name, self._setpoint, min_temp, @@ -294,7 +294,7 @@ def get_target_temperature(self): if setpointdict is not None: value = setpointdict["value"] _LOGGER.info( - "Device '%s': %s target temperature '%s'", + "Device '%s' %s target temperature '%s'", self._device.name, self._setpoint, value, @@ -311,7 +311,7 @@ def get_target_temperature_step(self): else: step_value = super().target_temperature_step _LOGGER.info( - "Device '%s': %s target temperature step '%s'", + "Device '%s' %s target temperature step '%s'", self._device.name, self._setpoint, step_value, @@ -352,7 +352,7 @@ def get_hvac_mode(self): if onoff["value"] != "off": mode = operationmode["value"] _LOGGER.info( - "Device '%s': %s hvac mode '%s'", + "Device '%s' %s hvac mode '%s'", self._device.name, self._setpoint, mode, @@ -477,7 +477,7 @@ def get_fan_modes(self): if operationmodedict is not None: fan_speed = operationmodedict.get("fanSpeed") if fan_speed is not None: - _LOGGER.info("Found fanspeed %s", fan_speed) + _LOGGER.info("Device '%s' has fanspeed %s", self._device.name, fan_speed) for c in fan_speed["currentMode"]["values"]: if c == FANMODE_FIXED: fsm = fan_speed.get("modes") diff --git a/custom_components/daikin_onecta/water_heater.py b/custom_components/daikin_onecta/water_heater.py index 656cbac..a7a3f20 100644 --- a/custom_components/daikin_onecta/water_heater.py +++ b/custom_components/daikin_onecta/water_heater.py @@ -54,7 +54,7 @@ def __init__(self, device, coordinator, management_point_type, embedded_id): self._management_point_type = management_point_type self.update_state() if self.supported_features & WaterHeaterEntityFeature.TARGET_TEMPERATURE: - _LOGGER.debug("Device '%s': tank temperature is settable", device.name) + _LOGGER.debug("Device '%s' tank temperature is settable", device.name) def update_state(self) -> None: self._attr_name = self._device.name