Skip to content

Commit 5f39012

Browse files
committed
More fixes
* custom_components/daikin_residential_altherma/const.py: * custom_components/daikin_residential_altherma/sensor.py:
1 parent 1f0a750 commit 5f39012

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

custom_components/daikin_residential_altherma/const.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
# MANAGEMENT POINTS
2929
MP_CLIMATE = "climateControlMainZone"
30-
MP_GATEWAY = "gateway" # NEW
30+
MP_GATEWAY = "gateway"
3131
MP_DOMESTIC_HWT = "domesticHotWaterTank"
3232
MP_INDOOR_UNIT = "indoorUnitHydro"
3333
MP_OUDOOR_UNIT = "outdoorUnit"
@@ -128,6 +128,7 @@
128128
ATTR_TANK_IS_IN_WARNING_STATE: [MP_DOMESTIC_HWT, "@TankisInWarningState", ""],
129129
ATTR_TANK_IS_POWERFUL_MODE_ACTIVE: [MP_DOMESTIC_HWT, "isPowerfulModeActive", ""],
130130
ATTR_TANK_ERROR_CODE: [MP_DOMESTIC_HWT, "errorCode", ""],
131+
# Gateway settings
131132
ATTR_WIFI_STRENGTH: [MP_GATEWAY, DP_WIFI_STRENGTH, ""],
132133
ATTR_WIFI_SSID: [MP_GATEWAY, DP_WIFI_SSID, ""],
133134
ATTR_LOCAL_SSID: [MP_GATEWAY, DP_LOCAL_SSID, ""],

custom_components/daikin_residential_altherma/sensor.py

+20-21
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,26 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
192192
else:
193193
_LOGGER.info("DAIKIN RESIDENTIAL ALTHERMA: device NOT supports error code")
194194

195+
if device.support_wifi_strength:
196+
_LOGGER.debug("DAIKIN RESIDENTIAL ALTHERMA: supports wifi signal strength")
197+
sensor = DaikinSensor.factory(device, ATTR_WIFI_STRENGTH, "")
198+
sensors.append(sensor)
199+
if device.support_wifi_ssid:
200+
_LOGGER.debug("DAIKIN RESIDENTIAL ALTHERMA: supports wifi ssid")
201+
sensor = DaikinSensor.factory(device, ATTR_WIFI_SSID, "")
202+
sensors.append(sensor)
203+
if device.support_local_ssid:
204+
_LOGGER.debug("DAIKIN RESIDENTIAL ALTHERMA: supports local ssid")
205+
sensor = DaikinSensor.factory(device, ATTR_LOCAL_SSID, "")
206+
sensors.append(sensor)
207+
if device.support_mac_address:
208+
_LOGGER.debug("DAIKIN RESIDENTIAL ALTHERMA: supports mac address")
209+
sensor = DaikinSensor.factory(device, ATTR_MAC_ADDRESS, "")
210+
sensors.append(sensor)
211+
if device.support_serial_number:
212+
_LOGGER.debug("DAIKIN RESIDENTIAL ALTHERMA: supports serial number")
213+
sensor = DaikinSensor.factory(device, ATTR_SERIAL_NUMBER, "")
214+
sensors.append(sensor)
195215

196216
#heatup
197217
if device.support_heatupMode:
@@ -252,27 +272,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
252272
else:
253273
_LOGGER.info("DAIKIN RESIDENTIAL ALTHERMA: device NOT supports tank error code")
254274

255-
if device.support_wifi_strength:
256-
_LOGGER.debug("DAIKIN RESIDENTIAL ALTHERMA: supports wifi signal strength")
257-
sensor = DaikinSensor.factory(device, ATTR_WIFI_STRENGTH, "")
258-
sensors.append(sensor)
259-
if device.support_wifi_ssid:
260-
_LOGGER.debug("DAIKIN RESIDENTIAL ALTHERMA: supports wifi ssid")
261-
sensor = DaikinSensor.factory(device, ATTR_WIFI_SSID, "")
262-
sensors.append(sensor)
263-
if device.support_local_ssid:
264-
_LOGGER.debug("DAIKIN RESIDENTIAL ALTHERMA: supports local ssid")
265-
sensor = DaikinSensor.factory(device, ATTR_LOCAL_SSID, "")
266-
sensors.append(sensor)
267-
if device.support_mac_address:
268-
_LOGGER.debug("DAIKIN RESIDENTIAL ALTHERMA: supports mac address")
269-
sensor = DaikinSensor.factory(device, ATTR_MAC_ADDRESS, "")
270-
sensors.append(sensor)
271-
if device.support_serial_number:
272-
_LOGGER.debug("DAIKIN RESIDENTIAL ALTHERMA: supports serial number")
273-
sensor = DaikinSensor.factory(device, ATTR_SERIAL_NUMBER, "")
274-
sensors.append(sensor)
275-
276275
async_add_entities(sensors)
277276

278277

0 commit comments

Comments
 (0)