diff --git a/custom_components/localtuya/core/ha_entities/fans.py b/custom_components/localtuya/core/ha_entities/fans.py index de3147c62..18ab2dd32 100644 --- a/custom_components/localtuya/core/ha_entities/fans.py +++ b/custom_components/localtuya/core/ha_entities/fans.py @@ -59,7 +59,7 @@ def localtuya_fan(fwd, rev, min_speed, max_speed, order, dp_type): fan_direction=DPCode.FAN_DIRECTION, fan_oscillating_control=FANS_OSCILLATING, custom_configs=localtuya_fan( - DIRECTION_FORWARD, DIRECTION_REVERSE, 1, 100, "disabled", "str" + DIRECTION_FORWARD, DIRECTION_REVERSE, 1, 100, "disabled", "int" ), ), ) diff --git a/custom_components/localtuya/core/ha_entities/selects.py b/custom_components/localtuya/core/ha_entities/selects.py index 471e942d3..8677f4fac 100644 --- a/custom_components/localtuya/core/ha_entities/selects.py +++ b/custom_components/localtuya/core/ha_entities/selects.py @@ -35,7 +35,7 @@ def localtuya_selector(options): "6": "6 Hours", } COUNT_DOWN_HOURS = { - "cancel": "Disable", + "off": "Disable", "1h": "1 Hour", "2h": "2 Hours", "3h": "3 Hours", @@ -590,6 +590,15 @@ def localtuya_selector(options): # Fan # https://developer.tuya.com/en/docs/iot/f?id=K9gf45vs7vkge "fs": ( + LocalTuyaEntity( + id=DPCode.MODE, + entity_category=EntityCategory.CONFIG, + icon="mdi:cog", + name="Mode", + custom_configs=localtuya_selector( + {"sleep": "Sleep", "normal": "Normal", "nature": "Nature"} + ), + ), LocalTuyaEntity( id=DPCode.FAN_VERTICAL, entity_category=EntityCategory.CONFIG,