Skip to content

Commit

Permalink
Minor fix: Rename climates.py in tuya devices data
Browse files Browse the repository at this point in the history
  • Loading branch information
xZetsubou committed Oct 21, 2023
1 parent 8c6889f commit 2d0589a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion custom_components/localtuya/core/tuya_devices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from .alarm_control_panels import ALARMS # not added yet
from .binary_sensor import BINARY_SENSORS
from .buttons import BUTTONS
from .climate import CLIMATES
from .climates import CLIMATES
from .covers import COVERS
from .fans import FANS
from .humidifiers import HUMIDIFIERS
Expand Down Expand Up @@ -111,6 +111,11 @@ def generate_tuya_device(localtuya_data: dict, tuya_category: str) -> dict | lis
if local_entity[CONF_ID] in entities:
continue

# Prevent duplicated friendly_name e.g. [switch_switch]
# if name := main_confs.get(CONF_FRIENDLY_NAME):
# if name.split()[0].lower() in device_name.split()[-1].lower():
# main_confs[CONF_FRIENDLY_NAME] = ""

local_entity.update(main_confs)
local_entity[CONF_PLATFORM] = platform
entities[local_entity.get(CONF_ID)] = local_entity
Expand Down

0 comments on commit 2d0589a

Please sign in to comment.