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 VALEHAUS SYZN119 towel warmer #1328

Merged
merged 4 commits into from
Dec 2, 2023

Conversation

latel
Copy link
Contributor

@latel latel commented Nov 20, 2023

name: VALEHAUS Towel Warmer
products:

  • id: 1dxb14emvqzxzc5q
    name: VALEHAUS SYZN119

VALEHAUS SYZN119 DPS

"mapping": {
                "1": {
                    "code": "switch",
                    "type": "Boolean",
                    "values": {}
                },
                "2": {
                    "code": "temp_set",
                    "type": "Integer",
                    "values": {
                        "unit": "\u00b0C",
                        "min": 35,
                        "max": 60,
                        "scale": 0,
                        "step": 5
                    }
                },
                "3": {
                    "code": "temp_current",
                    "type": "Integer",
                    "values": {
                        "unit": "\u00b0C",
                        "min": 0,
                        "max": 99,
                        "scale": 0,
                        "step": 1
                    }
                },
                "12": {
                    "code": "countdown_set",
                    "type": "Enum",
                    "values": {
                        "range": [
                            "cancel",
                            "1h",
                            "2h",
                            "3h",
                            "4h",
                            "5h",
                            "6h"
                        ]
                    }
                },
                "13": {
                    "code": "countdown_left",
                    "type": "Integer",
                    "values": {
                        "unit": "min",
                        "min": 0,
                        "max": 1440,
                        "scale": 0,
                        "step": 1
                    }
                },
                "14": {
                    "code": "work_state",
                    "type": "Enum",
                    "values": {
                        "range": [
                            "heating",
                            "standby"
                        ]
                    }
                }
            }

self test

image

@latel
Copy link
Contributor Author

latel commented Nov 20, 2023

There is one thing I have no idea how to fix yet, this device has a count_down dp 12, it's an enum, I map it into homeassistant's select entity, however when I change count_down time to eg 6h, it's still reporting dp 12 with status "cancel" not newly configured "6h".

 {
        "code": "countdown_set",
        "custom_name": "",
        "dp_id": 12,
        "time": 1699687833000,
        "value": "cancel"
      },

this result in that, when I try to set countdown from homeassistant ui, it will result in unkown, after a while.

@make-all
Copy link
Owner

You may need to observe the dp when you make changes from the app to see if the values match the dps mapping info you have above. If this information is not from the QueryThingsDataModel cloud API call, you may also get more accurate information from that.

@latel
Copy link
Contributor Author

latel commented Nov 21, 2023

You may need to observe the dp when you make changes from the app to see if the values match the dps mapping info you have above. If this information is not from the QueryThingsDataModel cloud API call, you may also get more accurate information from that.

I select different values from the enum within Tuya app, and immediate query the latest status data from IOT webpage, the latest value is not the one I selected, it's just always "cancel".
This is the reason why homeassistant report dp 12 as unkown after short period, because the latest value from tuya does not match the one I selected in the homassistant select entity.

Copy link
Owner

@make-all make-all left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This device seems like it should be a climate entity, with two timer related secondary entities.

power = hvac_mode (true = heat, false = "off")
temp_set = temperature
temp_current = current_temperature
work_mode = hvac_action (standby = idle, heating = heating / swapped if that is really a bug in the device)

For the Timer issue, as long as "Time remaining" updates when the timer is set, it should be enough feedback.

max: 99
unit: "℃"
- entity: select
name: countdown_set
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested name is "Timer", to be consistent with other devices.

- dps_val: "6h"
value: "6h"
- entity: sensor
name: countdown_left
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested name is "Time remaining" to be consistent with other devices.

@make-all make-all added the awaiting feedback Needs more information label Nov 25, 2023
@make-all
Copy link
Owner

Need feedback on the swapped standby and heating, other issues are minor, which I would fix myself, but I am not sure whether the swapped mapping is intentional, or a mistake.

@latel
Copy link
Contributor Author

latel commented Nov 28, 2023

Yes, the swap is intentional, it's a device bug. I have this device myself.

@make-all make-all removed the awaiting feedback Needs more information label Nov 28, 2023
latel and others added 2 commits December 2, 2023 22:25
- Pull most of the functionaity into a climate entity.
- standardise naming.

PR make-all#1328
@make-all make-all merged commit 55b0d7c into make-all:main Dec 2, 2023
4 checks passed
make-all added a commit that referenced this pull request Dec 2, 2023
- Pull most of the functionaity into a climate entity.
- standardise naming.

PR #1328
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