zigpy / zha-device-handlers

ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
Apache License 2.0
775 stars 703 forks source link

MOES Star Ring 2 gang Zigbee smart dimmer switch - switch on to 100% but dims to last preset instead #2752

Closed gorstj closed 5 months ago

gorstj commented 1 year ago
          There seems to be an issue with the Quirk for this device

Mainly works fine. However, when switching it on it comes on at the previously set value.

If useful, I can check the behavior with zigbee2mqtt

e.g. Dimmed to 5% Switched off Service call to switch on with brightness 100%--> turns on to 5% (shows 100% in GUI) or use GUI slider to turn on to 100% brightness-->turns on to 5% (shows 100% in GUI)

Subsequent changes (whilst the light is on) to brightness work fine.

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.11.2",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.6",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/London",
    "os_name": "Linux",
    "os_version": "6.1.56",
    "supervisor": "2023.11.0",
    "host_os": "Home Assistant OS 11.0",
    "docker_version": "24.0.6",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "heatmiserneo": {
      "version": "0.2.4",
      "requirements": [
        "neohubapi==1.0"
      ]
    },
    "smartthings_soundbar": {
      "version": "v1.0.2",
      "requirements": []
    },
    "hildebrandglow_dcc": {
      "version": "1.0.3",
      "requirements": [
        "pyglowmarkt==0.5.5"
      ]
    },
    "alexa_media": {
      "version": "4.6.5",
      "requirements": [
        "alexapy==1.27.6",
        "packaging>=20.3",
        "wrapt>=1.14.0"
      ]
    },
    "switch_manager": {
      "version": "1.3.1",
      "requirements": []
    },
    "scheduler": {
      "version": "v0.0.0",
      "requirements": []
    },
    "ocpp": {
      "version": "v0.4.42",
      "requirements": [
        "ocpp>=0.14.1",
        "websockets>=10.2",
        "jsonschema==4.19.0"
      ]
    },
    "audiconnect": {
      "version": "1.3.0",
      "requirements": [
        "audiconnectpy==1.4.4"
      ]
    },
    "climate_template": {
      "version": "0.6.1",
      "requirements": []
    },
    "fujitsu_airstage": {
      "version": "1.1.6",
      "requirements": [
        "pyairstage>=1.1.1"
      ]
    },
    "localtuya": {
      "version": "5.2.1",
      "requirements": []
    },
    "asusrouter": {
      "version": "0.23.0",
      "requirements": [
        "asusrouter==1.0.0"
      ]
    },
    "octopus_energy": {
      "version": "8.5.0",
      "requirements": []
    },
    "hacs": {
      "version": "1.33.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "zha_toolkit": {
      "version": "v1.1.4",
      "requirements": [
        "pytz"
      ]
    },
    "hildebrand_glow_ihd": {
      "version": "1.1.0",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "zha",
    "name": "Zigbee Home Automation",
    "after_dependencies": [
      "onboarding",
      "usb"
    ],
    "codeowners": [
      "@dmulcahey",
      "@adminiuga",
      "@puddly"
    ],
    "config_flow": true,
    "dependencies": [
      "file_upload"
    ],
    "documentation": "https://www.home-assistant.io/integrations/zha",
    "iot_class": "local_polling",
    "loggers": [
      "aiosqlite",
      "bellows",
      "crccheck",
      "pure_pcapy3",
      "zhaquirks",
      "zigpy",
      "zigpy_deconz",
      "zigpy_xbee",
      "zigpy_zigate",
      "zigpy_znp",
      "universal_silabs_flasher"
    ],
    "requirements": [
      "bellows==0.36.8",
      "pyserial==3.5",
      "pyserial-asyncio==0.6",
      "zha-quirks==0.0.106",
      "zigpy-deconz==0.21.1",
      "zigpy==0.59.0",
      "zigpy-xbee==0.19.0",
      "zigpy-zigate==0.11.0",
      "zigpy-znp==0.11.6",
      "universal-silabs-flasher==0.0.14",
      "pyserial-asyncio-fast==0.11"
    ],
    "usb": [
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*2652*",
        "known_devices": [
          "slae.sh cc2652rb stick"
        ]
      },
      {
        "vid": "1A86",
        "pid": "55D4",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus v2"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*sonoff*plus*",
        "known_devices": [
          "sonoff zigbee dongle plus"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*tubeszb*",
        "known_devices": [
          "TubesZB Coordinator"
        ]
      },
      {
        "vid": "1A86",
        "pid": "7523",
        "description": "*zigstar*",
        "known_devices": [
          "ZigStar Coordinators"
        ]
      },
      {
        "vid": "1CF1",
        "pid": "0030",
        "description": "*conbee*",
        "known_devices": [
          "Conbee II"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8A2A",
        "description": "*zigbee*",
        "known_devices": [
          "Nortek HUSBZB-1"
        ]
      },
      {
        "vid": "0403",
        "pid": "6015",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate+"
        ]
      },
      {
        "vid": "10C4",
        "pid": "EA60",
        "description": "*zigate*",
        "known_devices": [
          "ZiGate"
        ]
      },
      {
        "vid": "10C4",
        "pid": "8B34",
        "description": "*bv 2010/10*",
        "known_devices": [
          "Bitron Video AV2010/10"
        ]
      }
    ],
    "zeroconf": [
      {
        "type": "_esphomelib._tcp.local.",
        "name": "tube*"
      },
      {
        "type": "_zigate-zigbee-gateway._tcp.local.",
        "name": "*zigate*"
      },
      {
        "type": "_zigstar_gw._tcp.local.",
        "name": "*zigstar*"
      },
      {
        "type": "_uzg-01._tcp.local.",
        "name": "uzg-01*"
      },
      {
        "type": "_slzb-06._tcp.local.",
        "name": "slzb-06*"
      }
    ],
    "is_built_in": true
  },
  "data": {
    "ieee": "**REDACTED**",
    "nwk": 3222,
    "manufacturer": "_TZE204_zenj4lxv",
    "model": "TS0601",
    "name": "_TZE204_zenj4lxv TS0601",
    "quirk_applied": true,
    "quirk_class": "ts0601_dimmer.TuyaDoubleSwitchDimmerGP",
    "quirk_id": null,
    "manufacturer_code": 4417,
    "power_source": "Mains",
    "lqi": 47,
    "rssi": null,
    "last_seen": "2023-11-13T06:59:03",
    "available": true,
    "device_type": "Router",
    "signature": {
      "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.FullFunctionDevice|MainsPowered|RxOnWhenIdle|AllocateAddress: 142>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
      "endpoints": {
        "1": {
          "profile_id": "0x0104",
          "device_type": "0x0100",
          "input_clusters": [
            "0x0000",
            "0x0004",
            "0x0005",
            "0x0006",
            "0x0008",
            "0xef00"
          ],
          "output_clusters": [
            "0x000a",
            "0x0019"
          ]
        },
        "2": {
          "profile_id": "0x0104",
          "device_type": "0x0100",
          "input_clusters": [
            "0x0006",
            "0x0008"
          ],
          "output_clusters": []
        },
        "242": {
          "profile_id": "0xa1e0",
          "device_type": "0x0061",
          "input_clusters": [],
          "output_clusters": [
            "0x0021"
          ]
        }
      },
      "manufacturer": "_TZE204_zenj4lxv",
      "model": "TS0601"
    },
    "active_coordinator": false,
    "entities": [
      {
        "entity_id": "light.conservatory_light",
        "name": "_TZE204_zenj4lxv TS0601"
      },
      {
        "entity_id": "light.conservatory_light_2",
        "name": "_TZE204_zenj4lxv TS0601"
      },
      {
        "entity_id": "number.conservatory_on_off_transition_time",
        "name": "_TZE204_zenj4lxv TS0601"
      },
      {
        "entity_id": "number.conservatory_off_transition_time",
        "name": "_TZE204_zenj4lxv TS0601"
      },
      {
        "entity_id": "number.conservatory_on_off_transition_time_2",
        "name": "_TZE204_zenj4lxv TS0601"
      },
      {
        "entity_id": "number.conservatory_off_transition_time_2",
        "name": "_TZE204_zenj4lxv TS0601"
      }
    ],
    "neighbors": [
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Parent",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x4B82",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "88"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xF46B",
        "permit_joining": "Unknown",
        "depth": "3",
        "lqi": "97"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x9F39",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "48"
      },
      {
        "device_type": "Coordinator",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x0000",
        "permit_joining": "Unknown",
        "depth": "0",
        "lqi": "72"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xF776",
        "permit_joining": "Unknown",
        "depth": "2",
        "lqi": "3"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x4DBD",
        "permit_joining": "Unknown",
        "depth": "3",
        "lqi": "18"
      },
      {
        "device_type": "EndDevice",
        "rx_on_when_idle": "Off",
        "relationship": "Child",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0xAFAD",
        "permit_joining": "Unknown",
        "depth": "4",
        "lqi": "103"
      },
      {
        "device_type": "Router",
        "rx_on_when_idle": "On",
        "relationship": "Sibling",
        "extended_pan_id": "**REDACTED**",
        "ieee": "**REDACTED**",
        "nwk": "0x8282",
        "permit_joining": "Unknown",
        "depth": "1",
        "lqi": "0"
      }
    ],
    "routes": [],
    "endpoint_names": [
      {
        "name": "ON_OFF_LIGHT"
      },
      {
        "name": "ON_OFF_LIGHT"
      },
      {
        "name": "PROXY_BASIC"
      }
    ],
    "user_given_name": "conservatory ",
    "device_reg_id": "cc89f85f16807661c3566fb46c8107be",
    "area_id": null,
    "cluster_details": {
      "1": {
        "device_type": {
          "name": "ON_OFF_LIGHT",
          "id": 256
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0000": {
            "endpoint_attribute": "basic",
            "attributes": {
              "0x0001": {
                "attribute_name": "app_version",
                "value": 74
              },
              "0xfffd": {
                "attribute_name": "cluster_revision",
                "value": 2
              },
              "0x0006": {
                "attribute_name": "date_code",
                "value": ""
              },
              "0x0004": {
                "attribute_name": "manufacturer",
                "value": "_TZE204_zenj4lxv"
              },
              "0x0005": {
                "attribute_name": "model",
                "value": "TS0601"
              }
            },
            "unsupported_attributes": {
              "0x0008": {
                "attribute_name": "generic_device_class"
              },
              "0x0012": {
                "attribute_name": "device_enabled"
              },
              "0x0009": {
                "attribute_name": "generic_device_type"
              },
              "0x0013": {
                "attribute_name": "alarm_mask"
              },
              "0x0014": {
                "attribute_name": "disable_local_config"
              }
            }
          },
          "0x0004": {
            "endpoint_attribute": "groups",
            "attributes": {
              "0xfffd": {
                "attribute_name": "cluster_revision",
                "value": 2
              },
              "0x0000": {
                "attribute_name": "name_support",
                "value": 0
              }
            },
            "unsupported_attributes": {
              "0xfffe": {
                "attribute_name": "reporting_status"
              }
            }
          },
          "0x0005": {
            "endpoint_attribute": "scenes",
            "attributes": {
              "0xfffd": {
                "attribute_name": "cluster_revision",
                "value": 2
              }
            },
            "unsupported_attributes": {}
          },
          "0xef00": {
            "endpoint_attribute": "tuya_manufacturer",
            "attributes": {
              "0xef00": {
                "attribute_name": "mcu_version",
                "value": "1.0.0"
              }
            },
            "unsupported_attributes": {}
          },
          "0x0006": {
            "endpoint_attribute": "on_off",
            "attributes": {
              "0x0000": {
                "attribute_name": "on_off",
                "value": 0
              }
            },
            "unsupported_attributes": {
              "0x4003": {
                "attribute_name": "start_up_on_off"
              }
            }
          },
          "0x0008": {
            "endpoint_attribute": "level",
            "attributes": {
              "0xef02": {
                "attribute_name": "bulb_type",
                "value": 0
              },
              "0x0000": {
                "attribute_name": "current_level",
                "value": 255
              },
              "0xef01": {
                "attribute_name": "minimum_level",
                "value": 2
              },
              "0x0013": {
                "attribute_name": "off_transition_time",
                "value": 0
              },
              "0x0011": {
                "attribute_name": "on_level",
                "value": "None"
              },
              "0x0010": {
                "attribute_name": "on_off_transition_time",
                "value": 0
              }
            },
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {
          "0x000a": {
            "endpoint_attribute": "time",
            "attributes": {},
            "unsupported_attributes": {}
          },
          "0x0019": {
            "endpoint_attribute": "ota",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      },
      "2": {
        "device_type": {
          "name": "ON_OFF_LIGHT",
          "id": 256
        },
        "profile_id": 260,
        "in_clusters": {
          "0x0006": {
            "endpoint_attribute": "on_off",
            "attributes": {
              "0x0000": {
                "attribute_name": "on_off",
                "value": 0
              }
            },
            "unsupported_attributes": {
              "0x4003": {
                "attribute_name": "start_up_on_off"
              }
            }
          },
          "0x0008": {
            "endpoint_attribute": "level",
            "attributes": {
              "0xef02": {
                "attribute_name": "bulb_type",
                "value": 0
              },
              "0x0000": {
                "attribute_name": "current_level",
                "value": 255
              },
              "0x0003": {
                "attribute_name": "max_level",
                "value": "None"
              },
              "0xef01": {
                "attribute_name": "minimum_level",
                "value": 12
              },
              "0x0013": {
                "attribute_name": "off_transition_time",
                "value": 0
              },
              "0x0010": {
                "attribute_name": "on_off_transition_time",
                "value": 0
              }
            },
            "unsupported_attributes": {}
          }
        },
        "out_clusters": {}
      },
      "242": {
        "device_type": {
          "name": "PROXY_BASIC",
          "id": 97
        },
        "profile_id": 41440,
        "in_clusters": {},
        "out_clusters": {
          "0x0021": {
            "endpoint_attribute": "green_power",
            "attributes": {},
            "unsupported_attributes": {}
          }
        }
      }
    }
  }
}

Originally posted by @gorstj in https://github.com/zigpy/zha-device-handlers/issues/2628#issuecomment-1807571609

github-actions[bot] commented 5 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment đź‘Ť This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.