Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Casdon TD Pro 2 device #2098

Merged
merged 10 commits into from
Jul 15, 2024

Conversation

jianyun8023
Copy link
Contributor

@jianyun8023 jianyun8023 commented Jul 10, 2024

Add oven type device: Casdon Oven TD Pro 2.
Cloesd #2097

Preview:
image

custom_components/tuya_local/devices/casdon_td_pro_2.yaml Outdated Show resolved Hide resolved
custom_components/tuya_local/devices/casdon_td_pro_2.yaml Outdated Show resolved Hide resolved
custom_components/tuya_local/devices/casdon_td_pro_2.yaml Outdated Show resolved Hide resolved
custom_components/tuya_local/devices/casdon_td_pro_2.yaml Outdated Show resolved Hide resolved
custom_components/tuya_local/devices/casdon_td_pro_2.yaml Outdated Show resolved Hide resolved
custom_components/tuya_local/devices/casdon_td_pro_2.yaml Outdated Show resolved Hide resolved
custom_components/tuya_local/devices/casdon_td_pro_2.yaml Outdated Show resolved Hide resolved
custom_components/tuya_local/devices/casdon_td_pro_2.yaml Outdated Show resolved Hide resolved
custom_components/tuya_local/devices/casdon_td_pro_2.yaml Outdated Show resolved Hide resolved
custom_components/tuya_local/devices/casdon_td_pro_2.yaml Outdated Show resolved Hide resolved
YAML lint does not like the long lines.
Shorter messages are just as understandable.
@jianyun8023
Copy link
Contributor Author

@make-all I have finished the modifications and have localized some of the descriptions into English. I want to do localization adaptation in Chinese, and I can do this task.

I currently don’t understand how to use the translation_key to configure the fault_message value.

  • English: er1: Chamber Overheat Protection (Sensor temperature exceeds 290°C)
  • Chinese: er1:腔体高温保护(腔体传感器温度高于290°C)
      - id: 13
        type: bitfield
        name: fault_message
        mapping:
          - value: OK
          - dps_val: 0
            value: OK
          - dps_val: 1
            value: "er1: Chamber Overheat Protection (Sensor temperature exceeds 290°C)"
          - dps_val: 2
            value: "er2: Evaporation Tray Overheat Protection (Sensor temperature exceeds 200°C)"
          - dps_val: 4
            value: "er3: Chamber Low Temperature Protection (Temperature remains below 35°C for 5 minutes)"
          - dps_val: 8
            value: "er4: Evaporation Tray Low Temperature Protection (Temperature remains below 35°C for 5 minutes)"
          - dps_val: 16
            value: "er5: Sensor Connection Error (Open circuit in chamber or evaporation tray sensor)"
          - dps_val: 32
            value: "er6: Sensor Malfunction (Short circuit in chamber or evaporation tray sensor)"
          - dps_val: 64
            value: "er7: Display Board Communication Error"
          - dps_val: 128
            value: "er8: Water Tank Switch (CN7) Not Closed or Evaporation Tray NTC (CN3) Exceeds 125°C for 25 Seconds, Triggering Water Shortage Alert and Stopping Operation"

Two messages were still too long for yamllint, so reduced further.
@jianyun8023
Copy link
Contributor Author

@make-all Thank you for your assistance with my pull request.

@make-all
Copy link
Owner

If you want to translate those messages, I suggest using a more specific translation_key, such as oven_fault at the sensor level. I am not sure that translation handles non-standard extra attributes like "fault_message", so you may need to go back to an enum class sensor just for the message.
Make the values in the config "error_1", "error_2" etc, with the full message moved to the en.json and zh_CN.json files.

@jianyun8023
Copy link
Contributor Author

If you want to translate those messages, I suggest using a more specific translation_key, such as oven_fault at the sensor level. I am not sure that translation handles non-standard extra attributes like "fault_message", so you may need to go back to an enum class sensor just for the message.

Make the values in the config "error_1", "error_2" etc, with the full message moved to the en.json and zh_CN.json files.

@make-all No problem, I will make this modification after completing the merge and localization.

@make-all make-all merged commit 146e4e0 into make-all:main Jul 15, 2024
4 checks passed
@make-all
Copy link
Owner

I think the translations can be a new PR, I will merge this one now.

make-all added a commit that referenced this pull request Jul 15, 2024
@jianyun8023 jianyun8023 deleted the casdon-td-pro2 branch July 15, 2024 12:46
timlaing pushed a commit to timlaing/tuya-local that referenced this pull request Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants