Additional supported features renamed properly.

This commit is contained in:
Sebastian Muszynski
2018-03-15 19:50:12 +01:00
parent bdf7ea10c6
commit dbb03e124c

View File

@@ -477,7 +477,7 @@ class XiaomiGenericDevice(FanEntity):
async def async_set_buzzer_on(self):
"""Turn the buzzer on."""
if self.additional_supported_features & SUPPORT_SET_BUZZER == 0:
if self._additional_supported_features & SUPPORT_SET_BUZZER == 0:
return
await self._try_command(
@@ -486,7 +486,7 @@ class XiaomiGenericDevice(FanEntity):
async def async_set_buzzer_off(self):
"""Turn the buzzer off."""
if self.additional_supported_features & SUPPORT_SET_BUZZER == 0:
if self._additional_supported_features & SUPPORT_SET_BUZZER == 0:
return
await self._try_command(
@@ -495,7 +495,7 @@ class XiaomiGenericDevice(FanEntity):
async def async_set_child_lock_on(self):
"""Turn the child lock on."""
if self.additional_supported_features & SUPPORT_SET_CHILD_LOCK == 0:
if self._additional_supported_features & SUPPORT_SET_CHILD_LOCK == 0:
return
await self._try_command(
@@ -504,7 +504,7 @@ class XiaomiGenericDevice(FanEntity):
async def async_set_child_lock_off(self):
"""Turn the child lock off."""
if self.additional_supported_features & SUPPORT_SET_CHILD_LOCK == 0:
if self._additional_supported_features & SUPPORT_SET_CHILD_LOCK == 0:
return
await self._try_command(
@@ -638,7 +638,7 @@ class XiaomiAirPurifier(XiaomiGenericDevice):
async def async_set_led_on(self):
"""Turn the led on."""
if self.additional_supported_features & SUPPORT_SET_LED == 0:
if self._additional_supported_features & SUPPORT_SET_LED == 0:
return
await self._try_command(
@@ -647,7 +647,7 @@ class XiaomiAirPurifier(XiaomiGenericDevice):
async def async_set_led_off(self):
"""Turn the led off."""
if self.additional_supported_features & SUPPORT_SET_LED == 0:
if self._additional_supported_features & SUPPORT_SET_LED == 0:
return
await self._try_command(
@@ -656,7 +656,7 @@ class XiaomiAirPurifier(XiaomiGenericDevice):
async def async_set_led_brightness(self, brightness: int = 2):
"""Set the led brightness."""
if self.additional_supported_features & \
if self._additional_supported_features & \
SUPPORT_SET_LED_BRIGHTNESS == 0:
return
@@ -668,7 +668,7 @@ class XiaomiAirPurifier(XiaomiGenericDevice):
async def async_set_favorite_level(self, level: int = 1):
"""Set the favorite level."""
if self.additional_supported_features & \
if self._additional_supported_features & \
SUPPORT_SET_FAVORITE_LEVEL == 0:
return
@@ -678,7 +678,7 @@ class XiaomiAirPurifier(XiaomiGenericDevice):
async def async_set_auto_detect_on(self):
"""Turn the auto detect on."""
if self.additional_supported_features & SUPPORT_SET_AUTO_DETECT == 0:
if self._additional_supported_features & SUPPORT_SET_AUTO_DETECT == 0:
return
await self._try_command(
@@ -687,7 +687,7 @@ class XiaomiAirPurifier(XiaomiGenericDevice):
async def async_set_auto_detect_off(self):
"""Turn the auto detect off."""
if self.additional_supported_features & SUPPORT_SET_AUTO_DETECT == 0:
if self._additional_supported_features & SUPPORT_SET_AUTO_DETECT == 0:
return
await self._try_command(
@@ -696,7 +696,7 @@ class XiaomiAirPurifier(XiaomiGenericDevice):
async def async_set_learn_mode_on(self):
"""Turn the learn mode on."""
if self.additional_supported_features & SUPPORT_SET_LEARN_MODE == 0:
if self._additional_supported_features & SUPPORT_SET_LEARN_MODE == 0:
return
await self._try_command(
@@ -705,7 +705,7 @@ class XiaomiAirPurifier(XiaomiGenericDevice):
async def async_set_learn_mode_off(self):
"""Turn the learn mode off."""
if self.additional_supported_features & SUPPORT_SET_LEARN_MODE == 0:
if self._additional_supported_features & SUPPORT_SET_LEARN_MODE == 0:
return
await self._try_command(
@@ -714,7 +714,7 @@ class XiaomiAirPurifier(XiaomiGenericDevice):
async def async_set_volume(self, volume: int = 50):
"""Set the sound volume."""
if self.additional_supported_features & SUPPORT_SET_VOLUME == 0:
if self._additional_supported_features & SUPPORT_SET_VOLUME == 0:
return
await self._try_command(
@@ -723,7 +723,7 @@ class XiaomiAirPurifier(XiaomiGenericDevice):
async def async_set_extra_features(self, features: int = 1):
"""Set the extra features."""
if self.additional_supported_features & \
if self._additional_supported_features & \
SUPPORT_SET_EXTRA_FEATURES == 0:
return
@@ -733,7 +733,7 @@ class XiaomiAirPurifier(XiaomiGenericDevice):
async def async_reset_filter(self):
"""Reset the filter lifetime and usage."""
if self.additional_supported_features & SUPPORT_RESET_FILTER == 0:
if self._additional_supported_features & SUPPORT_RESET_FILTER == 0:
return
await self._try_command(
@@ -809,7 +809,7 @@ class XiaomiAirHumidifier(XiaomiGenericDevice):
async def async_set_led_brightness(self, brightness: int = 2):
"""Set the led brightness."""
if self.additional_supported_features & \
if self._additional_supported_features & \
SUPPORT_SET_LED_BRIGHTNESS == 0:
return
@@ -821,7 +821,7 @@ class XiaomiAirHumidifier(XiaomiGenericDevice):
async def async_set_target_humidity(self, humidity: int = 40):
"""Set the target humidity."""
if self.additional_supported_features & \
if self._additional_supported_features & \
SUPPORT_SET_TARGET_HUMIDITY == 0:
return
@@ -831,7 +831,7 @@ class XiaomiAirHumidifier(XiaomiGenericDevice):
async def async_set_dry_on(self):
"""Turn the dry mode on."""
if self.additional_supported_features & SUPPORT_SET_DRY == 0:
if self._additional_supported_features & SUPPORT_SET_DRY == 0:
return
await self._try_command(
@@ -840,7 +840,7 @@ class XiaomiAirHumidifier(XiaomiGenericDevice):
async def async_set_dry_off(self):
"""Turn the dry mode off."""
if self.additional_supported_features & SUPPORT_SET_DRY == 0:
if self._additional_supported_features & SUPPORT_SET_DRY == 0:
return
await self._try_command(