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

Added device file for Multi Leaf DY-107 Thermostat #1718

Merged
merged 5 commits into from Apr 5, 2024

Conversation

n4rrOx
Copy link
Contributor

@n4rrOx n4rrOx commented Mar 7, 2024

First of all, thank you for your hard work!

I created a config file for a thermostat which is from Tuya...
Other names I found are:
Lupum Dy-107
Wholesale Dy-107
Avatto Dy-107

More information about product:
https://www.electricvalvefactory.com/product/thermostat/dy107-floor-heating-thermostat.html
pic

DPs according this HowTo:
https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html#_8-find-your-data-point

Datapoints:

{"1":"Switch","2":"Mode","10":"Frost protection","16":"Set temperature","19":"Set temperature ceiling","24":"Current temperature","26":"The lower limit of temperature","27":"Temperature correction","30":"Weekly procedure (working day)","31":"Working day setting","36":"State of the valve","39":"Factory data reset","40":"Child lock","43":"Sensor selection","44":"Backlight brightness","45":"Fault alarm"}

Base data used for the implementation:

{
  "result": {
    "properties": [
      {
        "code": "switch",
        "custom_name": "",
        "dp_id": 1,
        "time": 1707827354644,
        "value": true
      },
      {
        "code": "mode",
        "custom_name": "",
        "dp_id": 2,
        "time": 1707827364710,
        "value": "manual"
      },
      {
        "code": "frost",
        "custom_name": "",
        "dp_id": 10,
        "time": 1707827366285,
        "value": true
      },
      {
        "code": "temp_set",
        "custom_name": "",
        "dp_id": 16,
        "time": 1707827365787,
        "value": 15
      },
      {
        "code": "upper_temp",
        "custom_name": "",
        "dp_id": 19,
        "time": 1707827366785,
        "value": 40
      },
      {
        "code": "temp_current",
        "custom_name": "",
        "dp_id": 24,
        "time": 1709711657183,
        "value": 19
      },
      {
        "code": "lower_temp",
        "custom_name": "",
        "dp_id": 26,
        "time": 1707827367779,
        "value": 10
      },
      {
        "code": "temp_correction",
        "custom_name": "",
        "dp_id": 27,
        "time": 1707827368276,
        "value": -5
      },
      {
        "code": "week_program3",
        "custom_name": "",
        "dp_id": 30,
        "time": 1709132128159,
        "value": "BgAAFAgAAA8LHgAPDB4ADxEAABYWAAAPCAAAFhcAAA8="
      },
      {
        "code": "work_days",
        "custom_name": "",
        "dp_id": 31,
        "time": 1707827369370,
        "value": "5_2"
      },
      {
        "code": "valve_state",
        "custom_name": "",
        "dp_id": 36,
        "time": 1707827365208,
        "value": "close"
      },
      {
        "code": "factory_reset",
        "custom_name": "",
        "dp_id": 39,
        "time": 1707827369869,
        "value": false
      },
      {
        "code": "child_lock",
        "custom_name": "",
        "dp_id": 40,
        "time": 1707827370372,
        "value": false
      },
      {
        "code": "sensor_choose",
        "custom_name": "",
        "dp_id": 43,
        "time": 1707827370864,
        "value": "in"
      },
      {
        "code": "backlight",
        "custom_name": "",
        "dp_id": 44,
        "time": 1707827375778,
        "value": 3
      },
      {
        "code": "fault",
        "custom_name": "",
        "dp_id": 45,
        "time": 1707827376278,
        "value": 0
      }
    ]
  },
  "success": true,
  "t": 1709808565858,
  "tid": "5d809cefdc7011eeb8e44adb5c011a40"
}

Screenshot of UI:
controls
thermo

@n4rrOx
Copy link
Contributor Author

n4rrOx commented Mar 8, 2024

          - dps_val: null
            value_redirect: alt

?
I Just copied one of the existing device files as a template and adjusted it with the Datapoints I posted above.
Works for me...

@make-all
Copy link
Owner

make-all commented Mar 9, 2024

The value_redirect: alt that you copied is for handling two slightly different devices from the same config. You should remove those two lines from the mapping, since you do not have an alt dp to redirect to when the main one is null (missing), and this config is only for one device.

@@ -0,0 +1,196 @@
name: Multi-leaf DY-107 thermostat
Copy link
Owner

Choose a reason for hiding this comment

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

Make this top level name generic (just "Thermostat" for example), as there may be other products that it matches.

min: -9
max: 9
- entity: switch
name: Anti-frost
Copy link
Owner

Choose a reason for hiding this comment

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

use translation_key: anti_frost here instead of name and icon, to make use of the new icon translations and name translation in latest release.

type: boolean
name: switch
- entity: lock
name: Child lock
Copy link
Owner

Choose a reason for hiding this comment

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

Use translation_key: child_lock here instead of name and the icon mappings below to make use of translations.

icon: "mdi:thermometer"
value: Both
- entity: binary_sensor
name: Error
Copy link
Owner

Choose a reason for hiding this comment

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

Remove this name, and use the standard "problem" class translations from Home Assistant.

value: false
- value: true
- entity: number
name: High temperature limit
Copy link
Owner

Choose a reason for hiding this comment

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

Usually I would use "High temperature limit" for an alarm point. Since this is setting the maximum for the temperature adjustment, I would use "Maximum temperature" here. Similarly for "Minimum temperature" below.

value: "7 days"
- dps_val: null
value_redirect: alt
- entity: number
Copy link
Owner

Choose a reason for hiding this comment

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

Make this a light entity, with just a brightness dp below.

@make-all make-all merged commit db5b868 into make-all:main Apr 5, 2024
4 checks passed
make-all added a commit that referenced this pull request Apr 7, 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.

None yet

2 participants