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 Gosund Dimmer SW2 #2812

Merged
merged 3 commits into from
Jan 19, 2025

Conversation

jcconnell
Copy link
Contributor

Adds support for the Gosund SW2 Dimmer switch.

Tuyas API Explorer output:

Device details:

{
  "result": {
    "active_time": 1736548924,
    "bind_space_id": "xxx",
    "category": "dj",
    "create_time": 1588141247,
    "custom_name": "Light",
    "icon": "smart/icon/ay1517974017716dABhC/8d518c970a152a978d8c3513bfcdb5bb.png",
    "id": "xxx",
    "ip": "xxx",
    "is_online": true,
    "lat": "xxx",
    "local_key": "xxx",
    "lon": "xxx",
    "model": "",
    "name": "SW2 2",
    "product_id": "qcgkaqmaivuwfwz4",
    "product_name": "SW2-AR",
    "sub": false,
    "time_zone": "-10:00",
    "update_time": 1736548926,
    "uuid": "xxx"
  },
  "success": true,
  "t": 1737243160296,
  "tid": "xxx"
}

Properties:

{
  "result": {
    "properties": [
      {
        "code": "led_switch",
        "custom_name": "",
        "dp_id": 1,
        "name": "",
        "time": 1737241202185,
        "type": "bool",
        "value": true
      },
      {
        "code": "bright_value",
        "custom_name": "",
        "dp_id": 3,
        "name": "",
        "time": 1737182288352,
        "type": "value",
        "value": 167
      },
      {
        "code": "temp_alarm",
        "custom_name": "",
        "dp_id": 101,
        "name": "",
        "time": 1736548932942,
        "type": "bool",
        "value": false
      }
    ]
  },
  "success": true,
  "t": 1737243283469,
  "tid": "xxx"
}

Instruction set

{
  "result": {
    "category": "dj",
    "functions": [
      {
        "code": "switch_led",
        "desc": "switch led",
        "name": "switch led",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "bright_value",
        "desc": "bright value",
        "name": "bright value",
        "type": "Integer",
        "values": "{\"min\":25,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}"
      }
    ]
  },
  "success": true,
  "t": 1737243342447,
  "tid": "xxx"
}

@make-all make-all merged commit 15ac106 into make-all:main Jan 19, 2025
4 checks passed
make-all added a commit that referenced this pull request Jan 19, 2025
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