Skip to content

Commit

Permalink
Fan: Fix deprecated features warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
xZetsubou committed Feb 19, 2024
1 parent 46cadfe commit 75e8b3a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom_components/localtuya/fan.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Platform to locally control Tuya-based fan devices."""

import logging
import math
from functools import partial
Expand Down Expand Up @@ -188,9 +189,9 @@ async def async_set_direction(self, direction):
self.schedule_update_ha_state()

@property
def supported_features(self) -> int:
def supported_features(self) -> FanEntityFeature:
"""Flag supported features."""
features = 0
features = FanEntityFeature(0)

if self.has_config(CONF_FAN_OSCILLATING_CONTROL):
features |= FanEntityFeature.OSCILLATE
Expand Down

0 comments on commit 75e8b3a

Please sign in to comment.