diff --git a/custom_components/tuya/const.py b/custom_components/tuya/const.py index b30ef88..ff1711e 100644 --- a/custom_components/tuya/const.py +++ b/custom_components/tuya/const.py @@ -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" @@ -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 diff --git a/custom_components/tuya/switch.py b/custom_components/tuya/switch.py index 688438c..f154eb2 100644 --- a/custom_components/tuya/switch.py +++ b/custom_components/tuya/switch.py @@ -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, @@ -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}]) \ No newline at end of file + self._send_command([{"code": self.entity_description.key, "value": False}])