Skip to content

Commit

Permalink
Update humidifier.py
Browse files Browse the repository at this point in the history
tank status added
  • Loading branch information
barban-dev authored Jan 19, 2021
1 parent a09f948 commit 18609b7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions custom_components/midea_dehumidifier/humidifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
For more details please refer to the documentation at
https://github.com/barban-dev/midea_inventor_dehumidifier
"""
VERSION = '1.0.1'
VERSION = '1.0.2'

import logging
from typing import List, Optional
Expand Down Expand Up @@ -75,16 +75,16 @@

#States Attributes
ATTR_ION_SET_SWITCH = "ion"
#ATTR_MODE = "mode"
ATTR_FAN_SPEED_MODE = "fan_speed_mode"
#ATTR_FAN_SPEED = "fan_speed"
ATTR_CURRRENT_HUMIDITY = "current_humidity"
ATTR_TANK = "tank_show"
PROP_TO_ATTR = {
"ionSetSwitch": ATTR_ION_SET_SWITCH,
"mode": ATTR_MODE,
"windSpeedMode": ATTR_FAN_SPEED_MODE,
"windSpeed": ATTR_FAN_SPEED,
"current_humidity": ATTR_CURRRENT_HUMIDITY,
"tank_show": ATTR_TANK,
}


Expand Down Expand Up @@ -177,6 +177,7 @@ def __init__(self, hass, client, targetDevice):
self._tankShow = False
self._dryClothesSetSwitch = None
self._upanddownSwing = None
self._tankShow = False

self._device_class = DEVICE_CLASS_DEHUMIDIFIER

Expand Down Expand Up @@ -263,6 +264,11 @@ def max_humidity(self):
"""Return the max humidity set."""
return 85

@property
def tank_show(self):
"""Return the tank status """
return self._tankShow

@property
def device_state_attributes(self):
"""Return entity specific state attributes."""
Expand Down Expand Up @@ -431,6 +437,7 @@ def __refresh_device_status(self):
self._tankShow = self._client.deviceStatus.tankShow
self._dryClothesSetSwitch = self._client.deviceStatus.dryClothesSetSwitch
self._upAndDownSwing = self._client.deviceStatus.upAndDownSwing
self._tankShow = self._client.deviceStatus.tankShow

#Useful or useless ?
#self.async_update_ha_state()
Expand Down

0 comments on commit 18609b7

Please sign in to comment.