Skip to content

Commit

Permalink
Auto Confgire: Fix scale type. #155
Browse files Browse the repository at this point in the history
  • Loading branch information
xZetsubou committed Mar 2, 2024
1 parent 137eadd commit 27a6ed9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/localtuya/core/ha_entities/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def get_dp_values(dp: str, dps_data: dict, req_info: CLOUD_VALUE = None) -> dict
# We only need the scaling factor, other values will be scaled from via later on.
# dp_values["min"] = scale(dp_values.get("min"), val_scale)
pref_type = req_info.prefer_type or int
val_scale = pref_type(dp_values.get("scale", 1))
val_scale = dp_values.get("scale", 1)
dp_values["min"] = pref_type(dp_values.get("min"))
dp_values["max"] = pref_type(dp_values.get("max"))
dp_values["step"] = pref_type(dp_values.get("step"))
Expand Down
1 change: 1 addition & 0 deletions custom_components/localtuya/core/ha_entities/selects.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,7 @@ def localtuya_selector(options):
icon="mdi:file-chart-outline",
),
),
# HDMI Sync Box A1
"hdmipmtbq": (
LocalTuyaEntity(
id=DPCode.VIDEO_SCENE,
Expand Down

0 comments on commit 27a6ed9

Please sign in to comment.