Skip to content

Commit f410259

Browse files
committed
Logging changes
* custom_components/daikin_residential_altherma/sensor.py: * custom_components/daikin_residential_altherma/water_heater.py:
1 parent f829b2c commit f410259

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

custom_components/daikin_residential_altherma/sensor.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
101101
sensorv = DaikinEnergySensor (device, embedded_id, management_point_type, mode, period, icon)
102102
sensors.append(sensorv)
103103
else:
104-
_LOGGER.info("Ignoring consumption data %s, not a supported operation_mode", mode)
104+
_LOGGER.info("Ignoring consumption data '%s', not a supported operation_mode", mode)
105105

106106
async_add_entities(sensors)
107107

@@ -138,18 +138,17 @@ def state(self):
138138
cdv = cd.get("value")
139139
if cdv is not None:
140140
cdve = cdv.get("electrical")
141-
_LOGGER.info("Device '%s' provides electrical", self._device.name)
142141
if cdve is not None:
143142
for mode in cdve:
144143
# Only handle consumptionData for an operation mode supported by this device
145144
if mode == self._operation_mode:
146-
_LOGGER.info("Device '%s' has energy value for mode %s %s", self._device.name, management_point_type, mode)
147145
energy_values = [
148146
0 if v is None else v
149147
for v in cdve[mode].get(self._period)
150148
]
151149
start_index = 7 if self._period == SENSOR_PERIOD_WEEKLY else 12
152150
energy_value = round(sum(energy_values[start_index:]), 3)
151+
_LOGGER.info("Device '%s' has energy value '%s' for mode %s %s", self._device.name, energy_value, management_point_type, mode)
153152

154153
return energy_value
155154

custom_components/daikin_residential_altherma/water_heater.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
4141
if management_point_type in supported_management_point_types:
4242
async_add_entities([DaikinWaterTank(device)], update_before_add=True)
4343
else:
44-
_LOGGER.info("'%s' has not a tank management point, ignoring as water heater", management_point_type)
44+
_LOGGER.info("Device '%s' '%s' is not a tank management point, ignoring as water heater", device.name, management_point_type)
4545

4646
class DaikinWaterTank(WaterHeaterEntity):
4747
"""Representation of a Daikin Water Tank."""

0 commit comments

Comments
 (0)