Moer Dimmer LIght Switch

I like to request support for the Moer Zigbee Dimmer Light Switch. see signature detail below.
THe switch I have is a 3-gang version
It is currently pick up as a router and not an End-Device. THis is a link to the vendor website.
Additional context
{
  "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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 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": 260,
      "device_type": "0x0051",
      "in_clusters": [
        "0x0000",
        "0x0004",
        "0x0005",
        "0xef00"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "_TZE200_vm1gyrso",
  "model": "TS0601",
  "class": "zigpy.device.Device"
}

A lot of info (thanks for that) but not exactly the one I expected.
That's what we are going to do, you need to enable the custom_zha_quirks in your installation. Here is an explanation how to do:

https://github.com/zigpy/zha-device-handlers/discussions/693#discussioncomment-857274
Another way if you are in docker:
https://github.com/zigpy/zha-device-handlers#testing-quirks-in-development-in-docker-based-install

Copy the ts0601_dimmer.py file in your custom_zha_quirks folder:

https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/ts0601_dimmer.py

And add this class at the bottom of your local file:
class TuyaTripleSwitchDimmerGPP(TuyaDimmerSwitch):
    """Tuya double channel dimmer device."""

    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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 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": 260, "device_type": "0x0051", "in_clusters": ["0x0000","0x0004","0x0005","0xef00"],"out_clusters": ["0x000a","0x0019"]},
        #     "242": {"profile_id": 41440,"device_type": "0x0061","in_clusters": [],"out_clusters": ["0x0021"]}
        # },
        # "manufacturer": "_TZE200_vm1gyrso",
        # "model": "TS0601",
        # "class": "zigpy.device.Device"

        MODELS_INFO: [
            ("_TZE200_vm1gyrso", "TS0601"),
        ],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaManufCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }

    replacement = {
        ENDPOINTS: {
            1: {
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaLevelControlManufCluster,
                    TuyaOnOffMCU,
                    TuyaInWallLevelControl,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    TuyaOnOffMCU,
                    TuyaInWallLevelControl,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    TuyaOnOffMCU,
                    TuyaInWallLevelControl,
                ],
                OUTPUT_CLUSTERS: [],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        }
    }

Restart HA and test. If the quirk load, the device signature will change.
Buttons 1 and 2 are expected to work. Botton 3 don't. We need logs from all not working functions.

I've managed to decode the messages from the third button, so we could have the quirk fully functional. But that requires extra work...
(The steps in the comment above should also be done)
You'll need to copy the tuya.mcu.__init__.py file to your custom_zha_quirks folder:

https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/mcu/__init__.py

In this file you have to modify the TuyaLevelControlManufCluster class to add DPs 15-18:
class TuyaLevelControlManufCluster(TuyaMCUCluster):
    """Tuya with Level Control data points."""

    dp_to_attribute: Dict[int, DPToAttributeMapping] = {
        1: DPToAttributeMapping(
            TuyaOnOff.ep_attribute,
            "on_off",
            dp_type=TuyaDPType.BOOL,
        ),
        2: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "current_level",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: (x * 255) // 1000,
            dp_converter=lambda x: (x * 1000) // 255,
        ),
        3: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "minimum_level",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: (x * 255) // 1000,
            dp_converter=lambda x: (x * 1000) // 255,
        ),
        4: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "bulb_type",
            dp_type=TuyaDPType.ENUM,
        ),
        7: DPToAttributeMapping(
            TuyaOnOff.ep_attribute,
            "on_off",
            dp_type=TuyaDPType.BOOL,
            endpoint_id=2,
        ),
        8: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "current_level",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: (x * 255) // 1000,
            dp_converter=lambda x: (x * 1000) // 255,
            endpoint_id=2,
        ),
        9: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "minimum_level",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: (x * 255) // 1000,
            dp_converter=lambda x: (x * 1000) // 255,
            endpoint_id=2,
        ),
        10: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "bulb_type",
            dp_type=TuyaDPType.ENUM,
            endpoint_id=2,
        ),
        15: DPToAttributeMapping(
            TuyaOnOff.ep_attribute,
            "on_off",
            dp_type=TuyaDPType.BOOL,
            endpoint_id=3,
        ),
        16: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "current_level",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: (x * 255) // 1000,
            dp_converter=lambda x: (x * 1000) // 255,
            endpoint_id=3,
        ),
        17: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "minimum_level",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: (x * 255) // 1000,
            dp_converter=lambda x: (x * 1000) // 255,
            endpoint_id=3,
        ),
        18: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "bulb_type",
            dp_type=TuyaDPType.ENUM,
            endpoint_id=3,
        ),
    }

Modify (a little further down) the data_point_handlers:
    data_point_handlers = {
        1: "_dp_2_attr_update",
        2: "_dp_2_attr_update",
        3: "_dp_2_attr_update",
        4: "_dp_2_attr_update",
        7: "_dp_2_attr_update",
        8: "_dp_2_attr_update",
        9: "_dp_2_attr_update",
        10: "_dp_2_attr_update",
        15: "_dp_2_attr_update",
        16: "_dp_2_attr_update",
        17: "_dp_2_attr_update",
        18: "_dp_2_attr_update",
    }

Now you can go back to your local ts0601_dimmer.py file and modify the zhaquirks.tuya.mcu import:
# from zhaquirks.tuya.mcu import (
from custom_zha_quirks import (
    TuyaInWallLevelControl,
    TuyaLevelControlManufCluster,
    TuyaOnOff as TuyaOnOffMCU,
)

Delete cache (any __pycache__ folder inside custom_zha_quirks), restart HA and test.

Thanks for the info. I do this later today when I am back at my desk and let you know. THanks again for the quick response.

Probably related to #1302
Traces shows messages as manufacturer_specific=False

THe device has now bind to the Quirk but it is not updating HA nor can I send switches from HA> I still get errors such as below in the log. THe example below was when I press the button on the switch. What info do I need to send to you?
Logger: zigpy.zcl
Source: /usr/local/lib/python3.9/site-packages/zhaquirks/tuya/init.py:1295
First occurred: 21:04:44 (2 occurrences)
Last logged: 21:04:48
[0x0e44:1:0xef00] No 'handle_get_data' tuya handler found for [TuyaCommand(status=0, tsn=228, dp=15, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x01', *payload=<Bool.true: 1>))]
[0x0e44:1:0xef00] No 'handle_get_data' tuya handler found for [TuyaCommand(status=0, tsn=229, dp=15, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x00', *payload=<Bool.false: 0>))]

What is the content of your custom_zha_quirks folder?
Have you copied the class tuya.mcu.__init__.py there?

https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/mcu/__init__.py

I have the following files in my custom_zha_quirks folder:

ts0601_dimmer.py
tuya.mcu.init.py

ts0601_dimmer.py
"""Tuya based touch switch."""
from zigpy.profiles import zha
from zigpy.zcl.clusters.general import Basic, GreenPowerProxy, Groups, LevelControl, Ota, Scenes, Time

from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODELS_INFO,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
)
from zhaquirks.tuya import (
    TuyaDimmerSwitch,
    TuyaLevelControl,
    TuyaManufacturerClusterOnOff,
    TuyaManufacturerLevelControl,
    TuyaManufCluster,
    TuyaOnOff,
)
#from zhaquirks.tuya.mcu import (
#    TuyaInWallLevelControl,
#    TuyaLevelControlManufCluster,
#    TuyaOnOff as TuyaOnOffMCU,
#)

# from zhaquirks.tuya.mcu import (
from custom_zha_quirks import (
    TuyaInWallLevelControl,
    TuyaLevelControlManufCluster,
    TuyaOnOff as TuyaOnOffMCU,
)

class TuyaSingleSwitchDimmer(TuyaDimmerSwitch):
    """Tuya touch switch device."""

    signature = {
        # "node_descriptor": "<NodeDescriptor byte1=1, byte2=64, mac_capability_flags=142, manufacturer_code=4098,
        # maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264,
        # maximum_outgoing_transfer_size=82, descriptor_capability_field=0>",
        # <SimpleDescriptor endpoint=1 profile=260 device_type=51 device_version=1 input_clusters=[0, 4, 5, 61184] output_clusters=[10, 25]>
        MODELS_INFO: [
            ("_TZE200_dfxkcots", "TS0601"),
            ("_TZE200_whpb9yts", "TS0601"),
            ("_TZE200_ebwgzdqq", "TS0601"),
            ("_TZE200_9i9dt8is", "TS0601"),
            ("_TZE200_swaamsoy", "TS0601"),
            ("_TZE200_0nauxa0p", "TS0601"),
            ("_TZE200_la2c2uo9", "TS0601"),
        ],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaManufCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            }
        },
    }

    replacement = {
        ENDPOINTS: {
            1: {
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    LevelControl.cluster_id,
                    TuyaManufacturerClusterOnOff,
                    TuyaOnOff,
                    TuyaManufacturerLevelControl,
                    TuyaLevelControl,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            }
        }
    }

class TuyaDoubleSwitchDimmer(TuyaDimmerSwitch):
    """Tuya double channel dimmer device."""

    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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>,
        #                     manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264,
        #                     maximum_outgoing_transfer_size=82, 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": 260, "device_type": "0x0051", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] }
        #   },
        #  "manufacturer": "_TZE200_e3oitdyu",
        #  "model": "TS0601",
        #  "class": "zigpy.device.Device"
        #  }
        MODELS_INFO: [
            ("_TZE200_e3oitdyu", "TS0601"),
        ],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaManufCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            }
        },
    }

    replacement = {
        ENDPOINTS: {
            1: {
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaLevelControlManufCluster,
                    TuyaOnOffMCU,
                    TuyaInWallLevelControl,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    TuyaOnOffMCU,
                    TuyaInWallLevelControl,
                ],
                OUTPUT_CLUSTERS: [],
            },
        }
    }

# ---------------------------------------------------------------------------
class TuyaTripleSwitchDimmerGPP(TuyaDimmerSwitch):
    """Tuya double channel dimmer device."""

    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.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 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": 260, "device_type": "0x0051", "in_clusters": ["0x0000","0x0004","0x0005","0xef00"],"out_clusters": ["0x000a","0x0019"]},
        #     "242": {"profile_id": 41440,"device_type": "0x0061","in_clusters": [],"out_clusters": ["0x0021"]}
        # },
        # "manufacturer": "_TZE200_vm1gyrso",
        # "model": "TS0601",
        # "class": "zigpy.device.Device"

        MODELS_INFO: [
            ("_TZE200_vm1gyrso", "TS0601"),
        ],
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.SMART_PLUG,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaManufCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }

    replacement = {
        ENDPOINTS: {
            1: {
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaLevelControlManufCluster,
                    TuyaOnOffMCU,
                    TuyaInWallLevelControl,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    TuyaOnOffMCU,
                    TuyaInWallLevelControl,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    TuyaOnOffMCU,
                    TuyaInWallLevelControl,
                ],
                OUTPUT_CLUSTERS: [],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        }
    }

tuya.mcu.init.py
"""Tuya MCU comunications."""
import dataclasses
from typing import Any, Callable, Dict, Optional, Tuple, Union

import zigpy.types as t
from zigpy.zcl import foundation
from zigpy.zcl.clusters.general import LevelControl, OnOff

from zhaquirks import Bus
from zhaquirks.tuya import (
    ATTR_ON_OFF,
    TUYA_MCU_COMMAND,
    TUYA_MCU_VERSION_RSP,
    TUYA_SET_DATA,
    Data,
    PowerOnState,
    TuyaCommand,
    TuyaData,
    TuyaLocalCluster,
    TuyaNewManufCluster,
)

# New manufacturer attributes
ATTR_MCU_VERSION = 0xEF00

class TuyaDPType(t.enum8):
    """Tuya DataPoint Type."""

    RAW = 0x00, None
    BOOL = 0x01, t.Bool
    VALUE = 0x02, t.uint32_t
    STRING = 0x03, None
    ENUM = 0x04, t.enum8
    BITMAP = 0x05, None

    def __new__(cls, value, ztype):
        """Overload instance to store the ztype."""

        member = t.enum8.__new__(cls, value)
        member.ztype = ztype
        return member

@dataclasses.dataclass
class DPToAttributeMapping:
    """Container for datapoint to cluster attribute update mapping."""

    ep_attribute: str
    attribute_name: str
    dp_type: TuyaDPType
    converter: Optional[
        Callable[
            [
                Any,
            ],
            Any,
        ]
    ] = None
    dp_converter: Optional[
        Callable[
            [
                Any,
            ],
            Any,
        ]
    ] = None
    endpoint_id: Optional[int] = None

class TuyaClusterData(t.Struct):
    """Tuya cluster data."""

    endpoint_id: int
    cluster_attr: str
    attr_value: int  # Maybe also others types?
    expect_reply: bool
    manufacturer: str

class MoesBacklight(t.enum8):
    """MOES switch backlight mode enum."""

    off = 0x00
    light_when_on = 0x01
    light_when_off = 0x02
    freeze = 0x03

class TuyaAttributesCluster(TuyaLocalCluster):
    """Manufacturer specific cluster for Tuya converting attributes <-> commands."""

    def read_attributes(
        self, attributes, allow_cache=False, only_cache=False, manufacturer=None
    ):
        """Ignore remote reads as the "get_data" command doesn't seem to do anything."""

        self.debug("read_attributes --> attrs: %s", attributes)
        return super().read_attributes(
            attributes, allow_cache=True, only_cache=True, manufacturer=manufacturer
        )

    async def write_attributes(self, attributes, manufacturer=None):
        """Defer attributes writing to the set_data tuya command."""

        records = self._write_attr_records(attributes)

        for record in records:

            self.debug("write_attributes --> record: %s", record)

            cluster_data = TuyaClusterData(
                endpoint_id=self.endpoint.endpoint_id,
                cluster_attr=self.attributes[record.attrid][0],
                attr_value=record.value.value,
                expect_reply=False,
                manufacturer=manufacturer,
            )
            self.endpoint.device.command_bus.listener_event(
                TUYA_MCU_COMMAND,
                cluster_data,
            )

        return [[foundation.WriteAttributesStatusRecord(foundation.Status.SUCCESS)]]

class TuyaMCUCluster(TuyaAttributesCluster, TuyaNewManufCluster):
    """Manufacturer specific cluster for sending Tuya MCU commands."""

    class MCUVersion(t.Struct):
        """Tuya MCU version response Zcl payload."""

        status: t.uint8_t
        tsn: t.uint8_t
        version_raw: t.uint8_t

        @property
        def version(self) -> str:
            """Format the raw version to X.Y.Z."""

            if self.version_raw:
                # MCU version is 1 byte length
                # is converted from HEX -> BIN -> XX.XX.XXXX -> DEC (x.y.z)
                # example: 0x98 -> 10011000 -> 10.01.1000 -> 2.1.8
                # https://developer.tuya.com/en/docs/iot-device-dev/firmware-version-description?id=K9zzuc5n2gff8#title-1-Zigbee%20firmware%20versions
                major = self.version_raw >> 6
                minor = (self.version_raw & 63) >> 4
                release = self.version_raw & 15

                return "{}.{}.{}".format(major, minor, release)

            return None

    attributes = TuyaNewManufCluster.attributes.copy()
    attributes.update(
        {
            # MCU version
            ATTR_MCU_VERSION: ("mcu_version", t.uint48_t, True),
        }
    )

    client_commands = TuyaNewManufCluster.client_commands.copy()
    client_commands.update(
        {
            TUYA_MCU_VERSION_RSP: foundation.ZCLCommandDef(
                "mcu_version_response",
                {"version": MCUVersion},
                True,
                is_manufacturer_specific=True,
            ),
        }
    )

    def __init__(self, *args, **kwargs):
        """Init."""
        super().__init__(*args, **kwargs)
        # Cluster for endpoint: 1 (listen MCU commands)
        self.endpoint.device.command_bus = Bus()
        self.endpoint.device.command_bus.add_listener(self)

    def from_cluster_data(self, data: TuyaClusterData) -> Optional[TuyaCommand]:
        """Convert from cluster data to a tuya data payload."""

        dp, mapping = self.get_dp_mapping(data.endpoint_id, data.cluster_attr)
        self.debug("from_cluster_data: %s, %s", dp, mapping)
        if dp:
            cmd_payload = TuyaCommand()
            cmd_payload.status = 0
            cmd_payload.tsn = self.endpoint.device.application.get_sequence()
            cmd_payload.dp = dp
            cmd_payload.data = TuyaData()
            datapoint_type = mapping.dp_type
            cmd_payload.data.dp_type = datapoint_type
            cmd_payload.data.function = 0
            val = data.attr_value
            if mapping.dp_converter:
                val = mapping.dp_converter(val)
                self.debug("converted: %s", val)
            if datapoint_type.ztype:
                val = datapoint_type.ztype(val)
                self.debug("ztype: %s", val)
            val = Data.from_value(val)
            self.debug("from_value: %s", val)
            cmd_payload.data.raw = t.LVBytes.deserialize(val)[0]
            self.debug("raw: %s", cmd_payload.data.raw)
            return cmd_payload
        else:
            self.warning(
                "No cluster_dp found for %s, %s",
                data.endpoint_id,
                data.cluster_attr,
            )
            return None

    def tuya_mcu_command(self, cluster_data: TuyaClusterData):
        """Tuya MCU command listener. Only manufacturer endpoint must listen to MCU commands."""

        self.debug(
            "tuya_mcu_command: cluster_data=%s",
            cluster_data,
        )

        tuya_command = self.from_cluster_data(cluster_data)
        self.debug("tuya_command: %s", tuya_command)
        if tuya_command:
            self.create_catching_task(
                self.command(
                    TUYA_SET_DATA,
                    tuya_command,
                    expect_reply=cluster_data.expect_reply,
                    manufacturer=cluster_data.manufacturer,
                )
            )
        else:
            self.warning(
                "no MCU command for data %s",
                cluster_data,
            )

    def get_dp_mapping(
        self, endpoint_id: int, attribute_name: str
    ) -> Optional[Tuple[int, DPToAttributeMapping]]:
        """Search for the DP in dp_to_attribute."""

        for dp, dp_mapping in self.dp_to_attribute.items():
            if (attribute_name == dp_mapping.attribute_name) and (
                endpoint_id in [dp_mapping.endpoint_id, self.endpoint.endpoint_id]
            ):
                self.debug("get_dp_mapping --> found DP: %s", dp)
                return [dp, dp_mapping]
        return [None, None]

    def handle_mcu_version_response(self, payload: MCUVersion) -> foundation.Status:
        """Handle MCU version response."""

        self.debug("MCU version: %s", payload.version)
        self.update_attribute("mcu_version", payload.version)
        return foundation.Status.SUCCESS

class TuyaOnOff(OnOff, TuyaLocalCluster):
    """Tuya MCU OnOff cluster."""

    attributes = {
        ATTR_ON_OFF: ("on_off", t.Bool),
    }

    async def command(
        self,
        command_id: Union[foundation.GeneralCommand, int, t.uint8_t],
        *args,
        manufacturer: Optional[Union[int, t.uint16_t]] = None,
        expect_reply: bool = True,
        tsn: Optional[Union[int, t.uint8_t]] = None,
    ):
        """Override the default Cluster command."""

        self.debug(
            "Sending Tuya Cluster Command... Cluster Command is %x, Arguments are %s",
            command_id,
            args,
        )

        # (off, on)
        if command_id in (0x0000, 0x0001):
            cluster_data = TuyaClusterData(
                endpoint_id=self.endpoint.endpoint_id,
                cluster_attr="on_off",
                attr_value=command_id,
                expect_reply=expect_reply,
                manufacturer=manufacturer,
            )
            self.endpoint.device.command_bus.listener_event(
                TUYA_MCU_COMMAND,
                cluster_data,
            )
            return foundation.Status.SUCCESS

        self.warning("Unsupported command_id: %s", command_id)
        return foundation.Status.UNSUP_CLUSTER_COMMAND

class TuyaOnOffManufCluster(TuyaMCUCluster):
    """Tuya with On/Off data points."""

    dp_to_attribute: Dict[int, DPToAttributeMapping] = {
        1: DPToAttributeMapping(
            TuyaOnOff.ep_attribute,
            "on_off",
            dp_type=TuyaDPType.BOOL,
        ),
        2: DPToAttributeMapping(
            TuyaOnOff.ep_attribute,
            "on_off",
            dp_type=TuyaDPType.BOOL,
            endpoint_id=2,
        ),
        3: DPToAttributeMapping(
            TuyaOnOff.ep_attribute,
            "on_off",
            dp_type=TuyaDPType.BOOL,
            endpoint_id=3,
        ),
        4: DPToAttributeMapping(
            TuyaOnOff.ep_attribute,
            "on_off",
            dp_type=TuyaDPType.BOOL,
            endpoint_id=4,
        ),
    }

    data_point_handlers = {
        1: "_dp_2_attr_update",
        2: "_dp_2_attr_update",
        3: "_dp_2_attr_update",
        4: "_dp_2_attr_update",
    }

class MoesSwitchManufCluster(TuyaOnOffManufCluster):
    """On/Off Tuya cluster with extra device attributes."""

    attributes = {
        0x8001: ("backlight_mode", MoesBacklight),
        0x8002: ("power_on_state", PowerOnState),
    }

    dp_to_attribute: Dict[
        int, DPToAttributeMapping
    ] = TuyaOnOffManufCluster.dp_to_attribute.copy()
    dp_to_attribute.update(
        {
            14: DPToAttributeMapping(
                TuyaMCUCluster.ep_attribute,
                "power_on_state",
                dp_type=TuyaDPType.ENUM,
                converter=lambda x: PowerOnState(x),
            )
        }
    )
    dp_to_attribute.update(
        {
            15: DPToAttributeMapping(
                TuyaMCUCluster.ep_attribute,
                "backlight_mode",
                dp_type=TuyaDPType.ENUM,
                converter=lambda x: MoesBacklight(x),
            ),
        }
    )

    data_point_handlers = TuyaOnOffManufCluster.data_point_handlers.copy()
    data_point_handlers.update({14: "_dp_2_attr_update"})
    data_point_handlers.update({15: "_dp_2_attr_update"})

class TuyaLevelControl(LevelControl, TuyaLocalCluster):
    """Tuya MCU Level cluster for dimmable device."""

    attributes = {0x0000: ("current_level", t.uint8_t)}

    async def command(
        self,
        command_id: Union[foundation.GeneralCommand, int, t.uint8_t],
        *args,
        manufacturer: Optional[Union[int, t.uint16_t]] = None,
        expect_reply: bool = True,
        tsn: Optional[Union[int, t.uint8_t]] = None,
    ):
        """Override the default Cluster command."""
        self.debug(
            "Sending Tuya Cluster Command. Cluster Command is %x, Arguments are %s",
            command_id,
            args,
        )
        # (move_to_level, move, move_to_level_with_on_off)
        if command_id in (0x0000, 0x0001, 0x0004):
            cluster_data = TuyaClusterData(
                endpoint_id=self.endpoint.endpoint_id,
                cluster_attr="current_level",
                attr_value=args[0],
                expect_reply=expect_reply,
                manufacturer=manufacturer,
            )
            self.endpoint.device.command_bus.listener_event(
                TUYA_MCU_COMMAND,
                cluster_data,
            )
            return foundation.Status.SUCCESS

        self.warning("Unsupported command_id: %s", command_id)
        return foundation.Status.UNSUP_CLUSTER_COMMAND

class TuyaInWallLevelControl(TuyaAttributesCluster, TuyaLevelControl):
    """Tuya Level cluster for inwall dimmable device."""

    # Not sure if these are 'inwall' specific attributes or common to dimmers
    attributes = TuyaLevelControl.attributes.copy()
    attributes.update(
        {
            0xEF01: ("minimum_level", t.uint32_t, True),
            0xEF02: ("bulb_type", t.enum8, True),
        }
    )

class TuyaLevelControlManufCluster(TuyaMCUCluster):
    """Tuya with Level Control data points."""

    dp_to_attribute: Dict[int, DPToAttributeMapping] = {
        1: DPToAttributeMapping(
            TuyaOnOff.ep_attribute,
            "on_off",
            dp_type=TuyaDPType.BOOL,
        ),
        2: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "current_level",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: (x * 255) // 1000,
            dp_converter=lambda x: (x * 1000) // 255,
        ),
        3: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "minimum_level",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: (x * 255) // 1000,
            dp_converter=lambda x: (x * 1000) // 255,
        ),
        4: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "bulb_type",
            dp_type=TuyaDPType.ENUM,
        ),
        7: DPToAttributeMapping(
            TuyaOnOff.ep_attribute,
            "on_off",
            dp_type=TuyaDPType.BOOL,
            endpoint_id=2,
        ),
        8: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "current_level",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: (x * 255) // 1000,
            dp_converter=lambda x: (x * 1000) // 255,
            endpoint_id=2,
        ),
        9: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "minimum_level",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: (x * 255) // 1000,
            dp_converter=lambda x: (x * 1000) // 255,
            endpoint_id=2,
        ),
        10: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "bulb_type",
            dp_type=TuyaDPType.ENUM,
            endpoint_id=2,
        ),
        15: DPToAttributeMapping(
            TuyaOnOff.ep_attribute,
            "on_off",
            dp_type=TuyaDPType.BOOL,
            endpoint_id=3,
        ),
        16: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "current_level",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: (x * 255) // 1000,
            dp_converter=lambda x: (x * 1000) // 255,
            endpoint_id=3,
        ),
        17: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "minimum_level",
            dp_type=TuyaDPType.VALUE,
            converter=lambda x: (x * 255) // 1000,
            dp_converter=lambda x: (x * 1000) // 255,
            endpoint_id=3,
        ),
        18: DPToAttributeMapping(
            TuyaLevelControl.ep_attribute,
            "bulb_type",
            dp_type=TuyaDPType.ENUM,
            endpoint_id=3,
        ),
    }

    data_point_handlers = {
        1: "_dp_2_attr_update",
        2: "_dp_2_attr_update",
        3: "_dp_2_attr_update",
        4: "_dp_2_attr_update",
        7: "_dp_2_attr_update",
        8: "_dp_2_attr_update",
        9: "_dp_2_attr_update",
        10: "_dp_2_attr_update",
        15: "_dp_2_attr_update",
        16: "_dp_2_attr_update",
        17: "_dp_2_attr_update",
        18: "_dp_2_attr_update",
    }

Ok, rename the file tuya.mcu.init.py to __init__.py (its original name).
Delete cache (all __pycache__ folders) and restart.

THe name was correct. It is just the copy to Bit that changed it. I also do not have a __pycache__ folder.

P.S When I look at the device in HA it also still show the device as a "Router" and not an "EndDevice"

Ummmm, not sure
You must have inside the custom_zha_quirks root two files, withou any folder something like:
custom_zha_quirks
+ ts0601_dimmer.py
+ __init__.py

P.S When I look at the device in HA it also still show the device as a "Router" and not an "EndDevice"

That's what the node_descriptor says:
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, .../..., *is_router=True, *is_security_capable=False)",

Did you expect something different?

It is very likely that the control from HA will not work. That issue is the one addressed in #1302
Maybe you can help us to test the solution 😉

I have now rename the file to __init__.py as you indicated but this is the log message I get.
Logger: homeassistant.config_entries
Source: custom_zha_quirks/__init__.py:165
First occurred: 21:41:57 (1 occurrences)
Last logged: 21:41:57

Error setting up entry Sonoff Zigbee 3.0 USB Dong - /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_3ef772decbc9eb11941c914f1d69213e-if00-port0, s/n: 3ef772decbc9eb11941c914f1d69213e - ITead - 10C4:EA60 for zha
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 99, in async_setup_entry
    setup_quirks(config)
  File "/usr/local/lib/python3.9/site-packages/zhaquirks/__init__.py", line 403, in setup
    importer.find_module(modname).load_module(modname)
  File "<frozen importlib._bootstrap_external>", line 529, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1029, in load_module
  File "<frozen importlib._bootstrap_external>", line 854, in load_module
  File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 711, in _load
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/config/custom_zha_quirks/ts0601_dimmer.py", line 28, in <module>
    from custom_zha_quirks import (
  File "/config/custom_zha_quirks/__init__.py", line 127, in <module>
    class TuyaMCUCluster(TuyaAttributesCluster, TuyaNewManufCluster):
  File "/config/custom_zha_quirks/__init__.py", line 165, in TuyaMCUCluster
    TUYA_MCU_VERSION_RSP: foundation.ZCLCommandDef(
AttributeError: module 'zigpy.zcl.foundation' has no attribute 'ZCLCommandDef'

THis is my root folder:
custom_zha_quirks
+ ts0601_dimmer.py
+ __init__.py

Ok, now the files are in place, but the Github version is updated from yours HA version. Let me see how fix it.
Would it be possible for you to upgrade to the beta version of HA?
(while I check how can I fix it)

Ok, you can get the file previous version from here:

https://github.com/zigpy/zha-device-handlers/blob/0d33f769b3352f882d719e288ef7419fc3166de3/zhaquirks/tuya/mcu/__init__.py

Then implement the changes from https://github.com/zigpy/zha-device-handlers/issues/1461#issuecomment-1088085670

No, the custom_zha_quirks seems to be working. The problem is at the zigpy library that has been updated and you don't have yet in your HA.
If you have access to the cli it can be done as:
ha core update --version 2022.4.0b5

OK I made the changes and it now loads correct without errors.
I now get the right device with the three switches AND when I press any of the three button of the physical switch to its on/off position it correctly show the right on/off status in HA.
What is not working is that I can change the switch status in HA and then the physical switch also change. It just jump back to its original state.

I have not upgraded, do you want me to try this still?

Is the dimmer part working also?
For all the three buttons?

What is not working is that I can change the switch status in HA and then the physical switch also change. It just jump back to its original state.

But to test it you need to update the zigpy library to the latest version.
The way I can think of to do it is to update to a beta version of HA or wait until tomorrow they release v2022.05 of HA.

OK. Lets wait to tomorrow then. After tomorrows update must I change to the original init file you provided or should I keep the one I have now?

I have not upgraded, do you want me to try this still?

If it's not too much trouble, it would be very useful to us.
(I'll be back here in a while)

After tomorrows update must I change to the original init file you provided or should I keep the one I have now?

You will need to replace with the actual one (and perform again all the modifications):

https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/mcu/__init__.py

@freemanm Edit title so it says -> "Moes 3 Gang Light Dimmer Switch ZS-USD3-WH-MS (Tuya "_TZE200_vm1gyrso", "TS0601")"
The current title says "Moer Dimmer LIght Switch" which wrong spelling and lack of info will not make anyone else fins this issue.

And just to make easier to read and scroll the thread, could you edit your https://github.com/zigpy/zha-device-handlers/issues/1461#issuecomment-1089234078 to put yhe class definitions in collapsed sections?
It would be something like:
I have the following files in my custom_zha_quirks folder:
* ts0601_dimmer.py
* tuya.mcu.__init__.py

<details>
  <summary>ts0601_dimmer.py</summary>
"""Tuya based touch switch."""
from zigpy.profiles import zha
from zigpy.zcl.clusters.general import Basic, GreenPowerProxy, Groups, LevelControl, Ota, Scenes, Time

from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODELS_INFO,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
)
.../...
</details>

<details>
  <summary>tuya.mcu.init.py</summary>
"""Tuya MCU comunications."""
import dataclasses
from typing import Any, Callable, Dict, Optional, Tuple, Union

import zigpy.types as t
from zigpy.zcl import foundation
from zigpy.zcl.clusters.general import LevelControl, OnOff

from zhaquirks import Bus
from zhaquirks.tuya import (
    ATTR_ON_OFF,
    TUYA_MCU_COMMAND,
    TUYA_MCU_VERSION_RSP,
    TUYA_SET_DATA,
    Data,
    PowerOnState,
    TuyaCommand,
    TuyaData,
    TuyaLocalCluster,
    TuyaNewManufCluster,
)
.../...
</details>

Thanks in advanced.
refs:

collapsed sections

I can't see how can be related to the quirk.
Any other related log? Something from zigpy or from zhaquirks?

The new version is being tested here too:

https://github.com/zigpy/zha-device-handlers/issues/1302

If you want to try it, the changes to make are the following:

add all the related imports:

from typing import Optional, Union

from zigpy.profiles import zha
from zigpy.quirks import CustomCluster
import zigpy.types as t
from zigpy.zcl import foundation
from zigpy.zcl.clusters.general import Basic, GreenPowerProxy, Groups, LevelControl, Ota, Scenes, Time

from zhaquirks.const import (
   .../...

add 2 new classes before the first class in the file:

class NoManufacturerCluster(CustomCluster):
    """Forces the NO manufacturer id in command."""

    async def command(
        self,
        command_id: Union[foundation.GeneralCommand, int, t.uint8_t],
        *args,
        manufacturer: Optional[Union[int, t.uint16_t]] = None,
        expect_reply: bool = True,
        tsn: Optional[Union[int, t.uint8_t]] = None,
    ):
        """Override the default Cluster command."""
        self.debug("Setting the NO manufacturer id in command: %s", command_id)
        return super().command(
            command_id,
            *args,
            zcl.foundation.ZCLHeader.NO_MANUFACTURER_ID,
            expect_reply,
            tsn,
        )

class TuyaInWallLevelControlNM(NoManufacturerCluster, TuyaInWallLevelControl):
    """Tuya Level cluster for inwall dimmable device with NoManufacturerID."""

    pass

modify in TuyaTripleSwitchDimmerGPP class the replacement part (replace the TuyaInWallLevelControl):

    replacement = {
        ENDPOINTS: {
            1: {
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Basic.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaLevelControlManufCluster,
                    TuyaOnOffMCU,
                    TuyaInWallLevelControlNM,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    TuyaOnOffMCU,
                    TuyaInWallLevelControlNM,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    TuyaOnOffMCU,
                    TuyaInWallLevelControlNM,
                ],
                OUTPUT_CLUSTERS: [],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        }
    }

Test the dimm function from HA and report.
Thanks in advanced.

@puddly Sorry to ping you directly, but I think that this error can be related with the zigpy version bump and all the changes related to ZCLv7:
Logger: homeassistant.components.websocket_api.http.connection
Source: components/zha/light.py:258
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 19:34:34 (1 occurrences)
Last logged: 19:34:34

[140335046155040] 'Status' object is not subscriptable
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 193, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 677, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 955, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 714, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 504, in async_handle_light_on_service
    await light.async_turn_on(**filter_turn_on_params(light, params))
  File "/usr/src/homeassistant/homeassistant/components/zha/light.py", line 258, in async_turn_on
    if isinstance(result, Exception) or result[1] is not Status.SUCCESS:
TypeError: 'Status' object is not subscriptable

Does it rings you any bell?
Probably the fault is in any tuya class (if not it would be a spread error) but I'm not able to see the reason.
Any advice or suggestion?
Thanks in advanced.

No worries, they probably are. What does the debug log show? Is any Tuya light class returning a list or status code directly? Any way to set a breakpoint to see what exactly result is and why it's a bare Status object?

No worries, they probably are. What does the debug log show? Is any Tuya light class returning a list or status code directly? Any way to set a breakpoint to see what exactly result is and why it's a bare Status object?

An affected user has open an issue. We can continue from there:

https://github.com/home-assistant/core/issues/69498

One more interesting posting for our @javicalle about MCU dimmers Z2M user have "finding" https://github.com/Koenkk/zigbee-herdsman/pull/519.
The linked issues have good sniffing from tuya TBGW :-)))

I have made the additional changes you requested with the same results.

I can receive the state changes, including brightness indicator when I use the dimm option on physical device in HA but I cannot change any status or brightness on the physical device from HA

Example: When I try and turn on or off a switch from HA I get an error.
Debug information
2022-04-07 20:40:20 DEBUG (MainThread) [zigpy_znp.api] Sending request: SYS.Ping.Req()
2022-04-07 20:40:20 DEBUG (MainThread) [zigpy_znp.api] Received command: SYS.Ping.Rsp(Capabilities=<MTCapabilities.APP_CNF|GP|UTIL|ZDO|AF|SYS: 1625>)
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy.zcl] [0xFA49:3:0x0006] Sending Tuya Cluster Command... Cluster Command is 1, Arguments are ()
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy.zcl] [0xFA49:1:0xef00] tuya_mcu_command: cluster_data=TuyaClusterData(endpoint_id=3, cluster_attr='on_off', attr_value=1, expect_reply=True)
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy.zcl] [0xFA49:1:0xef00] get_dp_mapping --> found DP: 15
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy.zcl] [0xFA49:1:0xef00] from_cluster_data: 15, DPToAttributeMapping(ep_attribute='on_off', attribute_name='on_off', dp_type=<TuyaDPType.BOOL: 1>, converter=None, dp_converter=None, endpoint_id=3)
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy.zcl] [0xFA49:1:0xef00] ztype: Bool.true
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy.zcl] [0xFA49:1:0xef00] from_value: [1, 1]
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy.zcl] [0xFA49:1:0xef00] raw: b'\x01'
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy.zcl] [0xFA49:1:0xef00] tuya_command: TuyaCommand(status=0, tsn=12, dp=15, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x01', *payload=<Bool.true: 1>))
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy.zcl] [0xFA49:1:0xef00] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=True, is_reply=0, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False), manufacturer=4417, tsn=13, command_id=0, *is_reply=False)
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy.zcl] [0xFA49:1:0xef00] Sending request: set_data(data=TuyaCommand(status=0, tsn=12, dp=15, data=TuyaData(dp_type=<TuyaDPType.BOOL: 1>, function=0, raw=b'\x01', *payload=<Bool.true: 1>)))
2022-04-07 20:40:40 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xFA49:3:0x0006]: executed 'on' command with args: '()' kwargs: '{}' result: Status.SUCCESS
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy_znp.api] Sending request: AF.DataRequestExt.Req(DstAddrModeAddress=AddrModeAddress(mode=<AddrMode.NWK: 2>, address=0xFA49), DstEndpoint=1, DstPanId=0x0000, SrcEndpoint=1, ClusterId=61184, TSN=13, Options=<TransmitOptions.SUPPRESS_ROUTE_DISC_NETWORK|ACK_REQUEST: 48>, Radius=30, Data=b'\x05\x41\x11\x0D\x00\x00\x0C\x0F\x01\x00\x01\x01')
2022-04-07 20:40:40 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139772139430480] 'Status' object is not subscriptable
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 193, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 677, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 955, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 714, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 504, in async_handle_light_on_service
    await light.async_turn_on(**filter_turn_on_params(light, params))
  File "/usr/src/homeassistant/homeassistant/components/zha/light.py", line 258, in async_turn_on
    if isinstance(result, Exception) or result[1] is not Status.SUCCESS:
TypeError: 'Status' object is not subscriptable
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataRequestExt.Rsp(Status=<Status.SUCCESS: 0>)
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.DataConfirm.Callback(Status=<Status.SUCCESS: 0>, Endpoint=1, TSN=13)
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy_znp.api] Received command: AF.IncomingMsg.Callback(GroupId=0x0000, ClusterId=61184, SrcAddr=0xFA49, SrcEndpoint=1, DstEndpoint=1, WasBroadcast=<Bool.false: 0>, LQI=195, SecurityUse=<Bool.false: 0>, TimeStamp=13397530, TSN=0, Data=b'\x18\x0D\x0B\x00\x83', MacSrcAddr=0xFA49, MsgResultRadius=29)
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy.zcl] [0xFA49:1:0xef00] Received ZCL frame: b'\x18\x0D\x0B\x00\x83'
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy.zcl] [0xFA49:1:0xef00] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, is_reply=1, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True), tsn=13, command_id=11, *is_reply=True)
2022-04-07 20:40:40 DEBUG (MainThread) [zigpy.zcl] [0xFA49:1:0xef00] Decoded ZCL frame: TuyaLevelControlManufCluster:Default_Response(command_id=0, status=<Status.UNSUP_MANUF_CLUSTER_COMMAND: 131>)

It's fine, the On/Off cluster is not fixed yet.
Can you attach the logs dimming the device from HA?

@freemanm I have ajusted the code.
Could you add the await clause in the method call? Just like this:
        self.debug("Setting the NO manufacturer id in command: %s", command_id)
        return await super().command(
            command_id,
            *args,
            foundation.ZCLHeader.NO_MANUFACTURER_ID,
            expect_reply,
            tsn,
        )

(also updated in original comment)

I'm messing everything up because I have parallel conversations in several threads.
@freemanm  could we continue the conversation in this other thread:

https://github.com/zigpy/zha-device-handlers/issues/1302#issuecomment-1092120739

Sorry for the inconvenience.

@freemanm I think this issue can be closed, since it is continued in the other one

No need to close now. When PR is created it can be linked to this (an others issues) just putting in the PR body: Fixes: #1461
This way, when PR is merged, automatically closes the related isuues

No need to close now. When PR is created it can be linked to this (an others issues) just putting in the PR body: Fixes: #1461
This way, when PR is merged, automatically closes the related isuues

Yes and another reason not to close is that sometimes can also happen that a PR is closed without being accepted and merged.

@javicalle @Hedda Okay, sorry, my mistake.

I got this working. Not perfect, but does the job. Here's a custom converter: https://gist.github.com/muxa/94e29b8896c89da910e4e4a80fc44894 (code needs a cleanup)
It detects and controls state (on/off) and brightness for all 3 gangs.
Known issues:

If you change brightness while the light is off, then turn it on, the brightness will not change to the new value, and will remain the same as before switching off. It would be good to fix this, but I don't know how (I've tried a couple of things, I left the code it, commented out).


Add support for custom Token model

This commit allows for using a custom token model by setting REST_AUTH_TOKEN_MODEL configuration. This model must define both a key and users fields, plus any extra field one need to add.
It also allows for defining a custom function to create new tokens, giving more flexibility regarding how tokens are created. It can be defined by setting REST_AUTH_TOKEN_CREATOR configuration.
My motivation for this implementation is that my auth tokens are retrieved from a backend auth system instead creating it from my own app.
Happy new year!

@caruccio Awesome! Please merge the latest master changes and then we're good to go..  Thanks!

@mariodev merge done, all tests passing. Cheers!

@caruccio :+1: :+1:


Only renders when in view

The panorama in Pannellum isn't rendered until the panorama is in view (e.g. scrolled into view on page).
Because I need a screenshot image from it, it would be great if it also works without being viewed first.
I also tried calling resize() for forcing a refresh/render - but it doesn't help.

I suspect this might be a browser related issue / restriction (e.g., to save resources). Pannellum doesn't have any code that specifically checks for anything like this.


rhbb2obb_v2.py, how rois convert to boxes

I have a question about hbb2obb_v2.py. The input boxes 's shape  is (n, 4) (xmin, ymin, xmax, ymax).And calculate boxes ’s "heights = boxes[..., 2] - boxes[..., 0] + 1.0",equal to xmax - xmin.But I think "xmax - xmin" calculate  boxes 's widths.Why did he do that?I sincerely hope you can answer it.

I have a question about hbb2obb_v2.py. The input boxes 's shape is (n, 4) (xmin, ymin, xmax, ymax).And calculate boxes ’s "heights = boxes[..., 2] - boxes[..., 0] + 1.0",equal to xmax - xmin.But I think "xmax - xmin" calculate boxes 's widths.Why did he do that?I sincerely hope you can answer it.

did you find how it works??
its my question too @zhaojingru408 @dingjiansw101


HSEARCH-4201 Upgrade to Elasticsearch 7.12

https://hibernate.atlassian.net/browse/HSEARCH-4201
I didn't create a different slot for ES 7.12, I added it to the ES 7.11.
If we need a different slot ,this pull request must be changed.

You renamed the property version.org.elasticsearch.latest-7.1`` to version.org.elasticsearch.latest-7.12`, but you did not replace all of its uses. Please replace them all.
Looks good apart from that.
As a reminder, the default build uses ES 7.10 (and that's what we want). Please run a full build just to be sure the ES7.11 (now 7.12) build runs fine.

Fixed, thanks!
Here is a full build: https://ci.hibernate.org/job/hibernate-search/view/change-requests/job/PR-2563/3/.

Merged, thanks


Rewrite the queueing lambda in Scala so that we can perform robust integration/unit testing on the lambda code

This is started in #88

The main holdover for this is doing full e2e testing

Currently blocked testing locally. https://github.com/localstack/localstack/issues/3793 Not sure how to resolve this atm. Putting the project down until I can get through this.


No Keyboard Output

When entering into debugger (byebug) with guard-minitest, I am unable to see the output while I am typing. I am using Rails 5.1.0.beta1 with byebug (9.0.6), guard (2.14.1), and guard-minitest (2.4.6).
If I run the test outside of guard, the debugger works fine. Does anyone have any ideas where I should be looking for a solution! Its hard to debug when you can't see what you type!

do you have rb-readline gem installed?
In my case (I had rb-readline 0.5.4) removing it from Gemfile solved this issue!

Worked for me as well! Thanks @descala !!!!!


Fix infrastructure.status.apiServerInternalURI for PublicAndPrivate

Currently in a PublicAndPrivate setup behind a proxy, nodes remain unready because ovn-node pods fail to talk to the control plane osdb and api endpoints. This is because the connection to .hypershift.local tries to go through the proxy. This PR set's the right value in the infra status that will result in hypershift.local being added to the NO_PROXY list of the ovn-pods via
https://github.com/openshift/cluster-network-operator/blob/8db9a00429dd4a5e4123b1217da93419557645eb/pkg/util/proxyconfig/no_proxy.go#L76
and
https://github.com/openshift/hypershift/blob/117c87f271ad7dc7cab875afb17769795fb7d117/control-plane-operator/controllers/hostedcontrolplane/cno/clusternetworkoperator.go#L248
Additionally we also want to let the CNO set .hypershift.local in NO_PROXY unconditionally as this is a design invariant https://github.com/openshift/cluster-network-operator/pull/1692

What this PR does / why we need it:
Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #
Checklist

[ ] Subject and description added to both, commit and PR.
[ ] Relevant issues have been referenced.
[ ] This change includes docs.
[ ] This change includes unit tests.

/lgtm


Make compatible with sensiolabs/security-checker 5.0

In sensiolabs/security-checker 5.x, the SensioLabs\Security\SecurityChecker::check() method returns a new SensioLabs\Security\Result object. This fix makes the SecurityAdvisory check compatible with this.

I changed the check to only work with sensiolabs/security-checker v5+


Use Emulator

Is your feature request related to a problem? Please describe.
When you have local/staging/prod environments, it gets quite tricky to test your changes (specially if you have Cloud Functions that handles the user creation (functions.auth.user().onCreate()).
Describe the solution you'd like and how you'd implement it
Currently react-firebaseui supports something like this:
        <StyledFirebaseAuth
          uiConfig={firebaseAuthConfig}
          firebaseAuth={
            process.env.NODE_ENV !== "production"
              ? firebase.auth().useEmulator("http://localhost:9099/")
              : firebase.auth()
          }
        />

But when I tried to use it, it breaks somewhere else:

Is this a breaking change?
I don't think so
Describe alternatives you've considered
I have no idea if there's any alternative

You can still initialize Firebase yourself (both JS SDK and admin SDK), before you call initAuth. When a Firebase app exists, this package will use it. Could you use the emulator that way?


Configure Zotero

Currently using:

Better BibTeX
Zotero LibreOffice Integration
ZotFile

...combined with zotero.org syncing.


Update devinit docs with enable-iis and windowsfeature-list

@kfam98 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@kfam98 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@ghogen - Could you take a look at this PR? New content usually is moved to the private repo so it can be validated through quality checks, Acrolinx, staging, and PR review. New articles usually need to be added to a TOC, also. Should someone on the content team move this commit to the private repo?  Thanks.

#sign-off

@gregvanl: I'm sorry - only the author of this article, @andysterland, can sign off on your changes. But we do have an exception process - if you are on the Microsoft content or product team for this product area, you can ask the PR review team to review and merge it by sending mail to the techdocprs alias.

@ktoliver We opted to take this PR off the engineer's plate and will have a follow up PR shortly in the private repo to add to the TOC.


Make spartacus work with powertools store

@Xymmer  master ticket and separate board not required?

Sample data PR is here: https://github.tools.sap/cx-commerce/spartacussampledataaddon/pull/13

Getting user's order details (use api: /users/{userId}/orders/{code}) does not check order expired or not. Only get guest's order (use api: /orders/{code}) checks order expiration.
Now, we use api: /users/{userId}/orders/{code}, because getting guest's order need "ROLE_TRUSTED_CLIENT".

To start powertools (https://localhost:4200/powertools-spa/en/USD/), go to branch: feature/GH-4519.

It's a go... ✅


Drop support for variable substition for program and runtime in package.json

Stop supporting variable substitution (e.g. ${workspaceRoot}) inside the package.json runtime and program fields.
We have never marketed this feature and now it is providing some debt when introducing multi root workspaces (as the package.json can not specify against which root to resolve the variables against)

Please see "Variable substitution in package.json will no longer be supported" in the upcoming July release notes.
Namedrops:
@DanTup @DonJayamanne @MSLaguana @WebFreak001 @andysterland @daviwil @delmyers @devoncarew @felixfbecker @gregg-miskelly @hbenl @lukaszunity @ramya-rao-a @rebornix @rkeithhill @roblourens @svaarala @vadimcn

Did you mean the debug launch.json or the actual extension package.json? If it's the launch.json, is "cwd": "${workspaceRoot}" still supported? There isn't really a solution to change the cwd to if you want to commit the debug file to a project if that variable gets removed from cwd.

@WebFreak001 as the titles says, I only mean variable substitution in the "package.json" of a debugger extension.

Phew.
Thanks for the clarification @weinand . Almost started panicking here.

@weinand I'm slightly confused by what's being dropped. I do have some instances of ${workspaceRoot} in my packages.json however I believe that all of them are just written into the launch.json literally, so no substitution is done.
Two of them (configurationAttributes/launch/properties/program/default here and initialConfigurations/program here) appear as the string ${workspaceRoot} and the other (configurationSnippets/bodyprogram here) is written as "^\"\\${workspaceRoot}/bin/main.dart\"".
Would I be right in assuming that none of this would be affected, but after the change maybe the last one would not need the escaping?
Thanks!

@DanTup yes, variable substitution in the package.json does not affect your contributions (and you can verify this easily because the generated launch.json should contain the ${workspaceRoot} variable literally).
The escaping for the snippets is needed because of the snippet syntax, not to prevent the variable substitution.

@weinand Gotcha! Thanks!


gomodule: fix Go 1.13 compilation

Fixes #914
Update go-ipfs to master (b15edf2) which solves many version-broken indirect dependencies.
The go-ipfs version update side consequences was a changed API regarding plugin loader. As far as I can see, the fix I've made makes sense but would like some second eyes that might have a better context.
The change in the API seems to consider what the code was doing manually before. The border case of repoPath being non-existant seems to be well handled in the LoadDirectory code:
// LoadDirectory loads a directory of plugins into the plugin loader.
func (loader *PluginLoader) LoadDirectory(pluginDir string) error {
	if err := loader.assertState(loaderLoading); err != nil {
		return err
	}
	newPls, err := loadDynamicPlugins(pluginDir)
	if err != nil {
		return err
	}

	for _, pl := range newPls {
		if err := loader.Load(pl); err != nil {
			return err
		}
	}
	return nil
}

func loadDynamicPlugins(pluginDir string) ([]plugin.Plugin, error) {
	_, err := os.Stat(pluginDir)
	if os.IsNotExist(err) {
		return nil, nil
	}
	if err != nil {
		return nil, err
	}

	return loadPluginsFunc(pluginDir)
}

where loadDynamicPlugins returns a (non error) nil/empty slice if the directory doesn't exist.
With this change make test run correctly for Go 1.13 and Go 1.12 (I tested that also).
PD: It would be good to use b15edf2 of go-ipfs dependency in other repos to keep that version consistent.

Oh, I think it should be also necessary to change the textile/builder docker image for the unit-test job in CI. With this current CI check it guarantees 1.12 compat, so maybe we can leave it this way for this PR, and maybe make another with only changing the textile/builder version in .circleci/config.yml

Agreed, we can build a new version of the builder. Nice work on this. Merge away!


Add benchmarks to README

I also did this WebSocket Benchmark
Result is very interesting!

Hey @nurmohammed840, thanks for sharing the results!
I've opened a PR https://github.com/nurmohammed840/web-socket-benchmark/pull/1 with some fixes

tokio-tungstenite use internal buffer,
I think we should add BufReader to stream (tokio::io::DuplexStream) layer? So that a fair comparison can be made...

@nurmohammed840 Yes, it does maintain an internal buffer https://github.com/denoland/fastwebsockets/blob/f3d5c10dc072dbcc3bd98fdca6001e8dc3706685/src/lib.rs#L182
That is why I removed BufReader in the PR


Remove the auto translation disclaimer

Update the docfx.json metadata to remove the auto translation disclaimer.

Docs Build status updates of commit 260643c:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

DocsLegal/docfx.json
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


feature: click on an image or file and get a preview

Typically, only images have a preview feature in most AI chat applications (like ChatGPT). Should I implement it just for images, or would you also like file previews?

I think image preview is plenty. Thank you!


No homematic.keypress on second SPDR

Hi,
I seem to have a problem with my second SPDR sensor:
When I trigger the sensor, I only get a state change for the counter and current/last passage direction, but no homematic.keypress event?
INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.spdr_sz_current_passage_direction, old_state=<state binary_sensor.spdr_sz_current_passage_direction=on; battery=High, rssi=-67, id=XXX, interface=ip, friendly_name=spdr_sz CURRENT_PASSAGE_DIRECTION @ 2018-07-24T20:21:30.870393+02:00>, new_state=<state binary_sensor.spdr_sz_current_passage_direction=off; battery=High, rssi=-67, id=XXX, interface=ip, friendly_name=spdr_sz CURRENT_PASSAGE_DIRECTION @ 2018-07-24T20:23:45.971775+02:00>> INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.spdr_sz_3_passage_counter_value, old_state=<state sensor.spdr_sz_3_passage_counter_value=12; battery=High, rssi=-67, id=XXX, interface=ip, friendly_name=spdr_sz 3 PASSAGE_COUNTER_VALUE @ 2018-07-24T20:21:28.231287+02:00>, new_state=<state sensor.spdr_sz_3_passage_counter_value=13; battery=High, rssi=-67, id=XXX, interface=ip, friendly_name=spdr_sz 3 PASSAGE_COUNTER_VALUE @ 2018-07-24T20:23:46.068712+02:00>>
Do you have any idea what the reason could be? All the settings of both sensors are the same.
Regards,
Nico

Just to clarify: you have two of these devices, and one of them works correctly, the other one only updates the states of the entities, but does not fire the PRESS events?

Yes, exactly 😩

Well that doesn't make any sense. Is there the possibility, that the device is configured differently on the CCU? You've sai dit has different modes. Maybe these modes have an effect on the PRESS-events.

Update: Now it works - sorry for bothering you!
Both sensors where configured exactly the same, as I said. But today I remembered, that I tested the first SPDR sensor without HomeAssistant with an program directly inside the CCU - and meanwhile I vaguely remember that this was needed with the HmIP switches, too.
But very weird that the sensors work without anything like this.

Uhm, could you please exactly explain what needs to be done on the CCU to get those events? This could be useful for others too. Maybe even the HomeMatic documentation for Home Assistant should mention that.

I wrote a small tutorial for the documentation. Could you please check if everything is understandable? And maybe I made mistake because of my bad English ;)
If everything is fine I can make a pull request for the documentation.

homematic.keypress event for HomeMatic IP devices
To get the homematic.keypress event for some HomeMatic IP devices like WRC2 / WRC6 (wall switch) or SPDR (passage sensor) you have to temporary create an empty program for each channel in the CCU:

In the menu go to Programs and connections > Programs & CCU connection
Go to New in the footer menu
Click the plus icon below Condition: If... and press the button Device selection
Select one of the device's channels you need (1-2 / 1-6 for WRC2 / WRC6 and 2-3 for SPDR)
Save the programm with the OK button
When your channel is working now, you can edit you program to select the other channels one by one
At the end you can delete the program

Looking good to me. Only a plural-S missing: homematic.keypress event s.
But the reviewers at the documentation-repo will also have another look at it. Don't be shy. 😉


ES5 compatibility in ES2015 module build

Using Webpack 2 to compile an application using most, the minification step generates this error:
ERROR in my_app.js from UglifyJs
SyntaxError: Unexpected token: name (r) [./~/most/src/source/fromIterable.js:22,0][my_app.js:6294,6]

function runProducer (t, iterator, sink) {
  let r = iterator.next()
      ^
  // ...
}

The generated bundle would also fail in browsers that don't support ES6 because of the let keyword.
Webpack 2 uses the value of the module key in package.json to resolve the most package with ES2015 modules, so it can apply tree shaking. In most, this is just the plain source code in most/src.
In the package module points to, all other statements than import and export should be usable in the environments most wants to support. To support ES5, we need to use var instead of let here. This was the only use of let I found in the source code, other than a couple ones in the tests which doesn't matter for app bundle compilation.
This pull request changes that one let to var.
If you guys are planning to use more ES6 features in the codebase, a separate build is probably needed that transpiles to ES5 (or whatever most wants to support), but doesn't transpile the import and export statements so that bundlers can take advantage of tree shaking.

Hello @tommikaikkonen, thank you very much for your PR! We're working very hard on the next version of mostjs over at @most/core and this was a backport of a much needed improvement which over there is transpiled and it slipped past us here :smile:

@tommikaikkonen We just published 1.2.1, with your change.  Sorry about that accidental let, and thanks for the fix!

Sweet, thanks guys! 👍


pinokio white screen

version  3.0.31.... help please

anyone anyone??? how do i resolve this?? 3.0.32 pre release wont work..


FEATURE REQUEST: Develop a 'Continue with Google' button in Login.js component.

Go to client/src/components/Login.js and add a 'Continue with Google' button below the login button.
Refer to the above image for reference.

@ani1609  hello Mentor, Can I start working on this issue.

@SHIVAA17 sure.


CI testing doesn't rebase/merge PR on latest master

As seen here:
https://github.com/openshift/jenkins/pull/306#issuecomment-306245483
our CI system just tests the PR branch, it doesn't merge the PR branch into master, meaning PRs are not being tested properly (could cause a breakage once merged, and also don't get the latest fixes included when their PR is tested).
it's been suggested that we use git fetch origin refs/pull/306/merge:my_new_branch; git checkout my_new_branch to get the merged branch, but it's also been suggested that there are issues w/ that.
@stevekuznetsov @dobbymoodge @csrwng

suggestion from @dobbymoodge:
I'm pretty sure the real fix is to change this line: https://github.com/openshift/vagrant-openshift/blob/master/lib/vagrant-openshift/command/test_origin_image.rb#L127
to something like `git checkout ${ref} ; git rebase master`

jenkins test job has been updated to do a proper master merge + test now.


the problem occurred when i use storescu to post the dcm on my dcm4chee server

it was return  an error likes E"ERROR: Received C-STORE-RSP with Status A900H for 0.dcm", but when i used the dcm file of website everthing is ok! please help me!!!

Hello @dejavunHui,
Your question is with respect to an error generated by dcm4chee. Please ask on their google group. If you have a SimpleITK specific question please ask on ITK discourse.


Static IPs on Zero Default Image

Zero's are not being assigned IP from DHCP.  Reimaged each Zero 3 times.  Same results.  Appeared to fix part of the problem by editing the /etc/network/interfaces.d/clusterhat to "force" it to use DHCP.
From the RPI controller: minicom p1, login using p1:clusterhat
On the Pi Zero: Edit /etc/network/interfaces.d/clusterhat and changed on the line for iface from manual to dhcp, e.g.,
allow-hotplug ethpi1
iface ethpi0 inet dhcp
pre-up ifup br0
pre-up brctl addif br0 ethpi1
up ifconfig ethpi1 up

Running: Prowler with RPI3B - Desktop Controller, RPI Zero W - Stretch Lite image for Zero P1|P2|P3|P4
Options - RPI versions 1B|2B|3B|3B+ and Zero W

The Cluster HAT images set a hostname that you can access via (p1.local ~ p4.local).
Are you using the Cluster HAT? Otherwise, how are you hooking everything up?

Tried that first, but didn't seem to know who p1.local was.  Once, I got the DHCP part working, then it was all good.


Printing stacktrace whenever a promise is rejected

I'd like to make it easier to troubleshoot whenever is test is failing because a promise was either rejected instead fulfilled or rejectedWith a different error.
Currently I get errors like that from chai which makes me start a debugger instead of immediately letting me know where the error thrown from
AssertionError: expected promise to be fulfilled but it was rejected with 'RequestError: Cannot read property \'request\' of undefined'

Would appreciate any advice on that.
Thanks!

#276


Drop /vendor BUILD files

Instead of a handcoded BUILD file which pulls in sources from and
external repo, make the external repo have the dart_library target.

Add pub_deps to the calls to pub_repository rule - this is the
information which is currently only in the BUILD files
Instead of a filegroup exporting srcs, use a dart_libary target
Replace all references to //vendor/ with @vendor_
Don't drop vendor_ from lib paths in the layout_action. We will
point. To these packages with the prefix in generate .packages files

Confirmed that the vm snapshots, like DDC html generator, can be built.

Presubmit passes locally for me - I think it's an incompatible version of bazel. Supporting old bazel version is not a priority right now. Will push and @kevmoo  will look at updating travis.


Module '"@ark-ui/solid"' has no exported member 'Dialog'

Hi friends! Sorry if it's too early for stuff like this, but I'm not able to import any components for the Dialog. When looking at intellisense there's actually only a handful of things that I can import.

@ark-ui/solid version: "^0.0.0-rc-20221106094212"
solid-js version: 1.6.8
If there's anything else I can do to help let me know! Thanks!

I looked<EMAIL_ADDRESS>dist file, but is no Dialog related code, you can upgrade the version to 0.0.0-rc-20230403193437

@ShumRain 0.0.0-rc-20221106094212 is the latest version according to npm. How can I upgrade it?

@ahhshm @mattwells19 you can do this in your package.json until Ark is in v1 "@ark-ui/solid": "rc", Rerun pnpm i
Let me know if that works

Yes, it works. Thank you

@ahhshm @mattwells19 you can do this in your package.json until Ark is in v1 "@ark-ui/solid": "rc", Rerun pnpm i
Let me know if that works

That worked for me as well. Thanks!


Logging fixes for 1.13

Note: Two of these fixes are on review upstream. Log buffer increase is only in our repo.
When increasing the log buffer size, the total RAM goes from ~45% to ~55%. The RAM usage is very stable, so this change should be fine. The previous (default) log size is 64KiB, this change doubles that to 128KiB.
For other fixes, this description is copied from upstream PR:
Solved Problem
When upgrading a cube orange to 1.13 we found log download by USB to not work when there was 50 or more logs on the target. In addition for less than 50 logs, it is necessary to request the list of logs two times for it to be generated. This is assuming we use QGroundControl (which requests 50 entries at a time with LOG_REQUEST_LIST), and USB connection.
There is two issues that cases this:

When opening the mavlink module by USB auto-start (from https://github.com/PX4/PX4-Autopilot/pull/16180) stdout and stderr is not open (unsure if stderr is a problem). This would cause file descriptor 1 to be reused when generating the log list, and the log list would be corrupted by an other part of the module erroneously writing to stdout. I could not replicate this in main, but I believe this is due to coincidence, and not it actually being fixed.
When receiving a LOG_REQUEST_LIST, the module assumes that when asking for more entries than currently exist, it indicates a new request, rather than pagination. This is a strange assumption, I feel, but I do not know where it originates from, and what the reason might be.

Solution

Open default file descriptors (/dev/null) when starting mavlink module, if 0, 1 and/or 2 is not open.
Use start index in LOG_REQUEST_LIST to determine if this is a new request, and log list should be regenerated.

Note, this also fixes the mavlink shell stall on cube orange, so https://github.com/PX4/PX4-Autopilot/pull/20824 should not be needed (but does now harm as far as I know).
Alternatives
Regarding the file descriptors, they could be fixed in the usb auto start section instead. I am not sure what would be the best approach.

Note: NT11 have log dropouts before 1.13 upgrade as well. The data are not sufficient to say if it is the same or worse.
NT02 have a lot of dropouts as well (1.12), while NT04 (1.12) have few/none. This correlates with results from sd_bench, which is good for NT04 and worse for both NT02 (1.12) and NT11 (1.13).


Additional uncaught bug from #109 fixed.

Turns out that the line "obj.constructor" also fails in Express, as determined in #109, and patched in #110.  This is another fix for #109 that solves this problem.

Thanks! Released in 3.2.1


[CT-1645] [Regression] Datetime format in run_results.json results.timing[].completed_at has no timezone

Is this a regression in a recent version of dbt-core?

[X] I believe this is a regression in dbt-core functionality
[X] I have searched the existing issues, and I could not find an existing issue for this regression

Current Behavior
run_results.json and sources.json has completed_at datetime in timing report without timezone.
      "timing": [
        {
          "name": "compile",
          "started_at": "2022-12-09T11:45:25.274155Z",
          "completed_at": "2022-12-09T11:45:25.294915"
        },
        {
          "name": "execute",
          "started_at": "2022-12-09T11:45:25.312143Z",
          "completed_at": "2022-12-09T11:45:25.984434"
        }
      ],

Expected/Previous Behavior
      "timing": [
        {
          "name": "compile",
          "started_at": "2022-12-09T11:45:25.274155Z",
          "completed_at": "2022-12-09T11:45:25.294915Z"
        },
        {
          "name": "execute",
          "started_at": "2022-12-09T11:45:25.312143Z",
          "completed_at": "2022-12-09T11:45:25.984434Z"
        }
      ],

Steps To Reproduce
Happens on dbt Cloud with version 1.4.0a1
Relevant log output
No response
Environment
dbt Cloud using HEAD version
- dbt (working version): 1.4.0a1 HEAD at 2022-12-07T15:45:32.039789Z
- dbt (regression version): 1.4.0a1 HEAD at 2022-12-07T16:01:21.330798Z

Which database adapter are you using with dbt?
bigquery
Additional Context
No response

Problem with timestamps, sometimes having timezone and sometimes not is also present in many dbt Cloud API endpoints.

@lustefaniak Thanks for reporting this!
I was able to reproduce this for run_results.json using dbt-core 1.4.0a1 (bigquery). I didn't try reproducing this for sources.json, but trust it is being rendered in a timezone-naive fashion as reported.
Agreed that started_at and completed_at should both be timezone-aware when rendered with an ISO 8601 format in run_results.json. Timestamps within sources.json should be timezone-aware as well.

Note that this issue resolves if mashumaro is rolled back to 3.1.1. I'm currently looking into workarounds and the option of going back to that version.

Related issue: https://github.com/Fatal1ty/mashumaro/issues/93

I got to the bottom of this issue in mashumaro and added my notes to the issue for them. Hopefully it will be enough information for them to fix it soon.


Using poetry

@JoanFM
Does vectordb use poetry for managing for managing all packages?

no it does not

Any plans for integrating that?

No, we do not have plans to develop this further. If anyone on the community wants to improve this, we would happily take it.

Well wanted to. Saw docarray implementing it so thought why not here as well.


postal smtp not working with gammadyne help pls

postal smtp not working with gammadyne help pls

what specifically is not working?


Missing Azure DevOps Services

https://learn.microsoft.com/en-us/azure/azure-government/compliance/azure-services-in-fedramp-auditscope
This page is missing details on Azure DevOps services. I have tried to find it on other sites but didn’t have any luck. It would be beneficial for me and likely others to include the DevOps products, or to link to another page with those details.

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 4e27d0b1-56f9-2eb7-8fee-0c47cfbafeac
Version Independent ID: 12556227-6adc-52c1-ac60-f341ae247e51
Content: Azure and other Microsoft cloud services compliance scope - Azure Government
Content Source: articles/azure-government/compliance/azure-services-in-fedramp-auditscope.md
Service: azure-government
GitHub Login: @stevevi
Microsoft Alias: stevevi

@tanichols
Thanks for your feedback! We will investigate and update as appropriate.

@tanichols - Did the above answer provided by @stevevi resolved your issue. It not, please let us know. thanks.

#please-close


Migrate common processor code to internal

This is in preparation for grype DB schema 6 in #2125. This PR migrates some of the common utility functions to an internal package.

@kzantow agreed, adjusted to make them all testUtils


Anagram: Tests and Example

This PR adds tests and example for the Anagram exercise.
Tests taken from x-common/anagram.json

Just my opinion again, but I don't think the anagram detector really needs to be an object 😁
I think detectAnagrams('master', ['stream', 'pigeon', 'maters']) would be much cleaner. In other tracks, including Python, they use a function but in others such as JavaScript an object is used so there seems to be some split ideas.
Theres a couple of tests that I'm not sure are needed

testDetectsUnicodeAnagrams and testEliminatesMisleadingUnicodeAnagrams - do we need this extra level of complexity?
testAnagramsMustUseAllLettersExactlyOnce2 - this seems very similar to a previous test and I think is redundant.
testAcceptsStringArguments and testAcceptsSingleStringArgument - Personally I think using func_get_args() and determining if you're given a string, array or multiple arguments is not a very nice thing to do. It adds a new level of confusion and can introduce all kinds of bugs in production code, we shouldn't be encouraging people to use this! I would suggest only accepting an array of candidate words instead.

As mentioned in OP, tests are identical from anagram.json. Thought it was preferable to have identical tests across all language tracks, but if you think they are redundant I'll remove them.
I don't like func_get_args() at all, just added it so you could pass unlimited strings like the JS implementation. I'll remove it and only accept an array

You're right about the patter/tapper test, I'm sorry. I think in this case it would be best to leave it in for consistency (but I still think it's redundant in the master anagram.json file too really 😉)

Refactored

I still think it's redundant in the master anagram.json file too really

Yeah, probably. I've opened an issue on the metadata repo about it.

@kytrinyx Want me to remove the patter/tapper tests?

I haven't heard back from the other maintainers on this (in the above linked issue). Let's leave it as is for now.


A meta-annotation to express "incompatible with "

For example imagine:
@IncompatibleWith({Nullable.class, NullUnspecified.class})
public @interface NonNull {...}

This would express that it is invalid to use this annotation and any of the listed ones together in the exact same spot. (Of course, it would not prevent two listed annotations from appearing together in the absence of the annotated annotation.)
By convention we could do it in both directions but only one would be necessary.

A compliant checker would not permit the conflicting annotations to appear together in code it is analyzing. But what if they appear together in some dependency of the code being analyzed?
I would suggest that checkers absolutely should not choose based on position (even if that order is preserved in the class file). And trying to specify an order of precedence somehow feels like a big waste of complexity with little to gain. And deciding to just ignore them all won't lead to anything good.
So, we might actually want the @IncompatibleWith docs to explicitly condone giving an error even if it's a dependency that contains the violation.

If there are annotations that express a subtyping relationship, such as @SubtypeOf, they can serve this purpose.  We might still need @IncompatibleWith, but maybe not for type annotations.

For jspecify, supporting this feels somewhat speculative to me, similar to how I feel about @NegatedBy/@NegatedOf.
The Checker Framework, by contrast, has more reason to support @SubtypeOf: It is part of what lets users define arbitrary new type systems.
Kevin has replied to my concerns on the other thread. I agree that there's some value to the annotations proposed in both this issue and #109, but both still feel to me to not be part of the minimum viable product.

(I can see making the actual release of said annotations lower priority, for sure. I just want us to be thinking ahead a bit, so that in 5 years we have a nice stable of stable annotations, where learning one actually helps you to learn another.)

One potentially nice thing about meta-annotations in general is that it lets us make changes in the annotations themselves and then have the behavior change automatically picked up by tools. Alternatively, that is a potentially scary thing :) But I'm not sure if it's necessarily any scarier than the idea that we'd make significant changes to existing annotations period.
This is similar to a discussion about using @Target vs. hardcoding that information in checkers.


With focus in terminal, can't open menus with Alt+access_key

Issue Type: Bug
With focus in the terminal, you can't open menus (from the main menubar) with the keyboard by pressing Alt and the menu access key (such as Alt-r for Run).  You have to press and release Alt, and then press the menu's access key.  So for example to open the Run menu, you have to press Alt, release Alt, and then press r.  (But worse is that you won't necessarily realize it will work even with that extra step, so you'll just assume keyboard access is broken.)
Happens on Win 10 even with the custom titlebar.
VS Code version: Code 1.53.2 (622cb03f7e070a9670c94bae1a45d78d7181fbd4, 2021-02-11T11:48:04.245Z)
OS version: Windows_NT x64 10.0.19041

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz (8 x 2712)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: enabled_onvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
23.79GB (10.90GB free)

Process Argv
--crash-reporter-id 42431fa7-02b8-4885-aa66-fb6b0034b665 --crash-reporter-id 42431fa7-02b8-4885-aa66-fb6b0034b665

Screen Reader
no

VM
44%

Extensions (3)

Extension
Author (truncated)
Version

gitlens
eam
11.2.1

vscode-pull-request-github
Git
0.23.1

cpptools
ms-
1.2.1

(3 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
pythonvspyt617cf:30253240
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry244:30256636
pythonvsdeb440:30248342
pythonvsded773:30248341
vstes627:30244334
pythonvspyt875:30259475
pythontbcf:30258532

@JohnKlenk please see setting: terminal.integrated.allowMnemonics
@Tyriar even with this setting, workbench.action.terminal.toggleFindRegex is conflicting with the menu bar

@Tyriar even with this setting, workbench.action.terminal.toggleFindRegex is conflicting with the menu bar

@sbatten just like in the editor, I'd say this is by designed since it's allow not force.

Thanks for the info about that setting.  I just enabled it.


Support additional file types

Refactor unit test
Execute tests in docker

Coverage remained the same at 100.0% when pulling 5fdafa28bce28cb82e23f8c673474f25c43c827f on file-types into 4793d7d6a15ace9eb7830739df72bb04e5087766 on 1.1.x.

Coverage remained the same at 100.0% when pulling 5fdafa28bce28cb82e23f8c673474f25c43c827f on file-types into 4793d7d6a15ace9eb7830739df72bb04e5087766 on 1.1.x.

Coverage remained the same at 100.0% when pulling 8c4fe791024827810d640dc740059fe92abfca53 on file-types into 4793d7d6a15ace9eb7830739df72bb04e5087766 on 1.1.x.


🌊 [Feature] Enhance existing game

 TODO:

Fixing typos if any

Make code more readable and concise

Make it better looking eg. adding ASCII art if runs on CLI, better display if runs on GUI, etc.

You are more than welcome to try out games and tools and suggest if you can think of any improvements!

@AseanK, I enhanced one of your existing games: Pizza Parlor and transformed it into a web-based game. It is built using streamlit. Once the PR is approved, I can deploy it on streamlit cloud using GitHub for general availability. Also, I updated the README.md of the pizza parlor to get started with the streamlit library.

Here is the PR: #40
Thank you!

@AseanK, I have a request - Could you please assign this issue to me so that I can officially work on other game enhancements?

@ruchit-t Have fun!


Add a codecov config file that disables project and changes statuses

Signed-off-by: Ying Li<EMAIL_ADDRESS>

LGTM, comment: off in particular for now 👍

LGTM

[Current coverage][cc-pull] is 73.50%

Merging [#698][cc-pull] into [master][cc-base-branch] will increase coverage by +0.31%

@@             master       #698   diff @@
==========================================
  Files            88         84     -4
  Lines         11563      10921   -642
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits           8461       8027   -434
+ Misses         2470       2310   -160
+ Partials        632        584    -48

File ...manager/filestore.go (not in diff) was modified. more

Misses +2
Partials 0
Hits -2

File ...manager/x509utils.go was modified. more

Misses -2
Partials -1
Hits +3

File ...rustpinning/certs.go was modified. more

Misses -2
Partials 0
Hits +2

[][cc-pull]

Powered by Codecov. Last updated by 2874955
[cc-base-branch]: https://codecov.io/gh/docker/notary/branch/master?src=pr
[cc-pull]: https://codecov.io/gh/docker/notary/pull/698?src=pr