Skip to content

Commit

Permalink
⚰️ [2024-04-28] 删除死代码: init 中无用的 fanmode 删除
Browse files Browse the repository at this point in the history
  • Loading branch information
MapleEve committed Apr 28, 2024
1 parent ccaeda4 commit 8c0f520
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions custom_components/lifesmart/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import logging

import websockets
from homeassistant.components.climate import FAN_HIGH, FAN_LOW, FAN_MEDIUM
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONF_URL,
Expand Down Expand Up @@ -449,17 +448,6 @@ def stop(self):
self._task = None


def get_fan_mode(_fanspeed):
fanmode = None
if _fanspeed < 30:
fanmode = FAN_LOW
elif _fanspeed < 65 and _fanspeed >= 30:
fanmode = FAN_MEDIUM
elif _fanspeed >= 65:
fanmode = FAN_HIGH
return fanmode


def get_platform_by_device(device_type, sub_device=None):
if device_type in SUPPORTED_SWTICH_TYPES:
return Platform.SWITCH
Expand Down

0 comments on commit 8c0f520

Please sign in to comment.