Skip to content

Commit 18609b7

Browse files
authored
Update humidifier.py
tank status added
1 parent a09f948 commit 18609b7

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

custom_components/midea_dehumidifier/humidifier.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
For more details please refer to the documentation at
44
https://github.com/barban-dev/midea_inventor_dehumidifier
55
"""
6-
VERSION = '1.0.1'
6+
VERSION = '1.0.2'
77

88
import logging
99
from typing import List, Optional
@@ -75,16 +75,16 @@
7575

7676
#States Attributes
7777
ATTR_ION_SET_SWITCH = "ion"
78-
#ATTR_MODE = "mode"
7978
ATTR_FAN_SPEED_MODE = "fan_speed_mode"
80-
#ATTR_FAN_SPEED = "fan_speed"
8179
ATTR_CURRRENT_HUMIDITY = "current_humidity"
80+
ATTR_TANK = "tank_show"
8281
PROP_TO_ATTR = {
8382
"ionSetSwitch": ATTR_ION_SET_SWITCH,
8483
"mode": ATTR_MODE,
8584
"windSpeedMode": ATTR_FAN_SPEED_MODE,
8685
"windSpeed": ATTR_FAN_SPEED,
8786
"current_humidity": ATTR_CURRRENT_HUMIDITY,
87+
"tank_show": ATTR_TANK,
8888
}
8989

9090

@@ -177,6 +177,7 @@ def __init__(self, hass, client, targetDevice):
177177
self._tankShow = False
178178
self._dryClothesSetSwitch = None
179179
self._upanddownSwing = None
180+
self._tankShow = False
180181

181182
self._device_class = DEVICE_CLASS_DEHUMIDIFIER
182183

@@ -263,6 +264,11 @@ def max_humidity(self):
263264
"""Return the max humidity set."""
264265
return 85
265266

267+
@property
268+
def tank_show(self):
269+
"""Return the tank status """
270+
return self._tankShow
271+
266272
@property
267273
def device_state_attributes(self):
268274
"""Return entity specific state attributes."""
@@ -431,6 +437,7 @@ def __refresh_device_status(self):
431437
self._tankShow = self._client.deviceStatus.tankShow
432438
self._dryClothesSetSwitch = self._client.deviceStatus.dryClothesSetSwitch
433439
self._upAndDownSwing = self._client.deviceStatus.upAndDownSwing
440+
self._tankShow = self._client.deviceStatus.tankShow
434441

435442
#Useful or useless ?
436443
#self.async_update_ha_state()

0 commit comments

Comments
 (0)