Skip to content

Commit

Permalink
Fix const
Browse files Browse the repository at this point in the history
  • Loading branch information
dougiteixeira committed Mar 15, 2022
1 parent c776b6f commit c750f09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions custom_components/tuya/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class DPCode(StrEnum):
BRIGHTNESS_MIN_1 = "brightness_min_1"
BRIGHTNESS_MIN_2 = "brightness_min_2"
BRIGHTNESS_MIN_3 = "brightness_min_3"
CALL_PHONE = "callphone"
CALLPHONE = "callphone"
CLOSED_OPENED = "closed_opened"
C_F = "c_f" # Temperature unit switching
CH2O_STATE = "ch2o_state"
Expand Down Expand Up @@ -374,10 +374,9 @@ class DPCode(StrEnum):
SMOKE_SENSOR_STATE = "smoke_sensor_state"
SMOKE_SENSOR_STATUS = "smoke_sensor_status"
SMOKE_SENSOR_VALUE = "smoke_sensor_value"
SOUND_MODE = "sound_mode"
SOS = "sos" # Emergency State
SOUND_MODE = "sound_mode"
SOS_STATE = "sos_state" # Emergency mode
SOUND_MODE = "sound_mode"
SPECIAL_CONTROL = "special_control"
SPECIAL_FUNCTION = "special_function"
SPEED = "speed" # Speed level
Expand Down
4 changes: 2 additions & 2 deletions custom_components/tuya/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@
entity_category=EntityCategory.CONFIG,
),
SwitchEntityDescription(
key=DPCode.CALL_PHONE,
key=DPCode.CALLPHONE,
name="Phone Call",
icon="mdi:phone-outline",
entity_category=EntityCategory.CONFIG,
Expand Down Expand Up @@ -790,4 +790,4 @@ def turn_on(self, **kwargs: Any) -> None:

def turn_off(self, **kwargs: Any) -> None:
"""Turn the switch off."""
self._send_command([{"code": self.entity_description.key, "value": False}])
self._send_command([{"code": self.entity_description.key, "value": False}])

0 comments on commit c750f09

Please sign in to comment.