internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: pymedusa/Medusa

Issue:
WARNING badge repeatedly lit up on SHOWQUEUE-UPDATE spurious IMDbPie "error"
Seems like this could be log.info() instead of log.warning().  On every nightly show update, the following appears in the log;  because it is a WARNING the tools pulldown badge is always lit with warnings every morning.  This makes the badge less useful.  Since the badge is always lit up, you don't know when there are actual warnings that might require your attention.

```
2022-05-16 02:26:32 DEBUG    SHOWQUEUE-UPDATE :: [e4870f8] Generating default search template for show Kiss Sixth Sense, creating template %SN S%0SE%0E, title Kiss Sixth Sense, season -1
2022-05-16 02:26:32 DEBUG    SHOWQUEUE-UPDATE :: [e4870f8] Generating default search template for show Kiss Sixth Sense, creating template %SN S%0SE%0E, title Kiss Sixth Sense, season -1
2022-05-16 02:26:32 DEBUG    SHOWQUEUE-UPDATE :: [e4870f8] 409595: Retrieving show info from IMDb
2022-05-16 02:26:32 DEBUG    SHOWQUEUE-UPDATE :: [e4870f8] 409595: Loading show info from IMDb with ID: tt000None
2022-05-16 02:26:32 WARNING  SHOWQUEUE-UPDATE :: [e4870f8] 409595: IMDbPie error while loading show info: invalid imdb id
2022-05-16 02:26:32 DEBUG    SHOWQUEUE-UPDATE :: [e4870f8] 409595: IMDb didn't return any info for tt000None, skipping update.
2022-05-16 02:26:32 DEBUG    SHOWQUEUE-UPDATE :: [e4870f8] 409595: Saving new IMDb show info to database

```
Note the surrounding context describing the show "Kiss Sixth Sense" that is involved.

I did a quick hack in .../medusa//tv/series.py (on line 1692 of master branch) to simply change it from log.warning() to log.info().





Discussion:
Apologies, I haven't done a pull request ("patch"?) here before, so a single word change seems like [for me at least] it is overkill to learn how to do a pull request ("patch"?) and then probly screw it up on my part.  (Then have an extra branch sitting around in my environment just for the one word change...  A branch I have to later nuke, which has always seemed quite tedious in github.)  Again, apologies.
Nah this is some kind of bug `Loading show info from IMDb with ID: tt000None`
That shouldn't happen.

From which indexer has this show been added?
The indexer for that show (at the time of adding it to Medusa's DB) was thetvdb
So at the time - i suspect - that show didn't have an imdb added in tvdb. But it has now. So I can't reproduce it for that show now.
Maybe you could help me find a show on tvdb that doesn't have the imdb yet.

Resolving patch:
diff --git a/medusa/indexers/imdb/api.py b/medusa/indexers/imdb/api.py
--- a/medusa/indexers/imdb/api.py
+++ b/medusa/indexers/imdb/api.py
@@ -64,6 +64,10 @@ def imdb_id(self):
     @imdb_id.setter
     def imdb_id(self, value):
         """Set imdb id."""
+        if value is None or value == '':
+            self._imdb_id = self.series_id = None
+            return
+
         if isinstance(value, string_types) and 'tt' in value:
             self._imdb_id = self._clean(value)
             self.series_id = int(self._imdb_id.split('tt')[-1])


Test patch:
Repository: pymedusa/Medusa

Issue:
Version=Unknown when Check software updates is disabled
**Describe the bug**
In General Configuration > Updates, if I disable **Check software updates** then the `Help & Info` page will show `Version: Unknown`  after a Medusa restart.
I expect it to always show the version, no matter what settings i disable.


**To Reproduce**
1. See `Version: 1.0.8` on Help & Info page
2. Go to General Configuration > Updates
3. Click on `Check software updates` to disable it
4. Restart Medusa
5. Go to Help & Info page
6. See `Version: Unknown`

**Expected behavior**
Always show Medusa version (`1.0.8` at the moment) in info page no matter if user wants software updates checking.

**Screenshots**
issue : 
![image](https://user-images.githubusercontent.com/10365746/189494558-c0536afa-ac5f-4d4a-a776-fc9faf6e1ccc.png)

expected :
![image](https://user-images.githubusercontent.com/10365746/189494653-641fae6a-8d90-4e3b-a5d3-80837b8a38e5.png)


**Medusa :**
 - OS: Linux on aarch64 with _pymedusa/medusa_ container
 - Branch: master
 - Commit: [f690170c2cbd9f2804c38a6047059cb1ace8afe3](https://github.com/pymedusa/Medusa/commit/f690170c2cbd9f2804c38a6047059cb1ace8afe3)
 - Python version: 3.10.4
 - Database version: [e.g. 44.19

**Additional context**
Same issue with linuxserver/medusa container.



Discussion:

Resolving patch:
diff --git a/medusa/__main__.py b/medusa/__main__.py
--- a/medusa/__main__.py
+++ b/medusa/__main__.py
@@ -1096,10 +1096,9 @@ def initialize(self, console_logging=True):
             except Exception:
                 pass
 
-            if app.VERSION_NOTIFY:
-                updater = CheckVersion().updater
-                if updater and updater.current_version:
-                    app.APP_VERSION = updater.current_version
+            updater = CheckVersion().updater
+            if updater and updater.current_version:
+                app.APP_VERSION = updater.current_version
 
             # initialize the static NZB and TORRENT providers
             app.providerList = providers.make_provider_list()


Test patch:
Repository: zigpy/zha-device-handlers

Issue:
Missing import for types breaking LocalDataCluster



Discussion:

Resolving patch:
diff --git a/zhaquirks/__init__.py b/zhaquirks/__init__.py
--- a/zhaquirks/__init__.py
+++ b/zhaquirks/__init__.py
@@ -2,6 +2,7 @@
 import pkgutil
 from zigpy.quirks import CustomCluster
 from zigpy.util import ListenableMixin
+import zigpy.types as types
 
 UNKNOWN = 'Unknown'
 


Test patch:
Repository: zigpy/zha-device-handlers

Issue:
Ikea group support bind method doesn't return status as expected
https://github.com/dmulcahey/zha-device-handlers/blob/b5b383939944ff541ee38a94c7f4d6cf3edc611f/zhaquirks/ikea/__init__.py#L25

https://github.com/home-assistant/home-assistant/blob/a30c37017b7782473294d7999e85d7a369a0539a/homeassistant/components/zha/core/helpers.py#L56

reported by @Adminiuga 

we should return the status in [ ] so the bind helper in HA is happy.


Discussion:

Resolving patch:
diff --git a/zhaquirks/ikea/__init__.py b/zhaquirks/ikea/__init__.py
--- a/zhaquirks/ikea/__init__.py
+++ b/zhaquirks/ikea/__init__.py
@@ -22,4 +22,5 @@ async def bind(self):
         group_list = await self.get_group_identifiers(0)
         group_record = group_list[2]
         group_id = group_record[0].group_id
-        await coordinator.add_to_group(group_id)
+        status = await coordinator.add_to_group(group_id)
+        return [status]


Test patch:
Repository: zigpy/zha-device-handlers

Issue:
Philips Remote DIM_DOWN typo?
https://github.com/dmulcahey/zha-device-handlers/blob/833ee24710496d317a03b0f0b9f61df31291d75b/zhaquirks/philips/rwl021.py#L137

It seems that it should be:
`ARGS: [1, 30, 9],`


Discussion:
Good catch. I’ll fix it in the next release.

Resolving patch:
diff --git a/zhaquirks/philips/rwl021.py b/zhaquirks/philips/rwl021.py
--- a/zhaquirks/philips/rwl021.py
+++ b/zhaquirks/philips/rwl021.py
@@ -134,7 +134,7 @@ class PhilipsRWL021(CustomDevice):
             COMMAND: COMMAND_STEP,
             CLUSTER_ID: 8,
             ENDPOINT_ID: 1,
-            ARGS: [1, 56, 9],
+            ARGS: [1, 30, 9],
         },
         (LONG_PRESS, DIM_DOWN): {
             COMMAND: COMMAND_STEP,


Test patch:
Repository: zigpy/zha-device-handlers

Issue:
Keen Home Smart Vent Models
I've been having problems with the Keen Home Smart Vent Quirks and realized that there are additional models that need the DoublingPowerConfigurationCluster on them. I validated that the following manufacturer/models work when added but am unable to submit the change myself.

("Keen Home Inc", "SV01-410-MP-1.1")
("Keen Home Inc", "SV01-410-MP-1.0")
("Keen Home Inc", "SV01-410-MP-1.5")
("Keen Home Inc", "SV02-410-MP-1.3")


Discussion:
[Zigbee ID: "SV02-410-MP-1.3"; "SV02-610-MP-1.3"](https://zigbee.blakadder.com/Keen_Home_SV02.html)

[Zigbee ID: "SV01-410-MP-1.0'"; "SV01-410-MP-1.1"; "SV01-410-MP-1.4"; "SV01-410-MP-1.5"; "SV01-412-MP-1.0"; "SV01-610-MP-1.0"; "SV01-612-MP-1.0"](https://zigbee.blakadder.com/Keen_Home_SV01.html)

Do the signatures match for all of them?

Resolving patch:
diff --git a/zhaquirks/keenhome/sv02612mp13.py b/zhaquirks/keenhome/sv02612mp13.py
--- a/zhaquirks/keenhome/sv02612mp13.py
+++ b/zhaquirks/keenhome/sv02612mp13.py
@@ -37,7 +37,18 @@ class KeenHomeSmartVent(CustomDevice):
         # input_clusters=[
         #   0, 1, 3, 4, 5, 6, 8, 32, 1026, 1027, 2821, 64513, 64514]
         # output_clusters=[25]>
-        MODELS_INFO: [("Keen Home Inc", "SV02-612-MP-1.3")],
+        MODELS_INFO: [
+            ("Keen Home Inc", "SV01-410-MP-1.0"),
+            ("Keen Home Inc", "SV01-410-MP-1.1"),
+            ("Keen Home Inc", "SV01-410-MP-1.4"),
+            ("Keen Home Inc", "SV01-410-MP-1.5"),
+            ("Keen Home Inc", "SV02-410-MP-1.3"),
+            ("Keen Home Inc", "SV01-412-MP-1.0"),
+            ("Keen Home Inc", "SV01-610-MP-1.0"),
+            ("Keen Home Inc", "SV02-610-MP-1.3"),
+            ("Keen Home Inc", "SV01-612-MP-1.0"),
+            ("Keen Home Inc", "SV02-612-MP-1.3"),
+        ],
         ENDPOINTS: {
             1: {
                 PROFILE_ID: zha.PROFILE_ID,


Test patch:
Repository: zigpy/zha-device-handlers

Issue:
Remove string part of Aqara cube AnalogInput values
A formatter was attached to AnalogInput in a recent ZHA change in HA. This causes the sensor to error out when showing the rotation because we currently set "rotate_right:<degrees>". remove the string part of this to fix the issue in HA.


Discussion:

Resolving patch:
diff --git a/zhaquirks/xiaomi/aqara/cube.py b/zhaquirks/xiaomi/aqara/cube.py
--- a/zhaquirks/xiaomi/aqara/cube.py
+++ b/zhaquirks/xiaomi/aqara/cube.py
@@ -207,9 +207,7 @@ def _update_attribute(self, attrid, value):
                 else:
                     self._current_state[STATUS_TYPE_ATTR] = ROTATE_LEFT
                 # show something in the sensor in HA
-                super()._update_attribute(
-                    0, "{}:{}".format(self._current_state[STATUS_TYPE_ATTR], value)
-                )
+                super()._update_attribute(0, value)
                 if self._current_state[STATUS_TYPE_ATTR] is not None:
                     self.listener_event(
                         ZHA_SEND_EVENT,
diff --git a/zhaquirks/xiaomi/aqara/cube_aqgl01.py b/zhaquirks/xiaomi/aqara/cube_aqgl01.py
--- a/zhaquirks/xiaomi/aqara/cube_aqgl01.py
+++ b/zhaquirks/xiaomi/aqara/cube_aqgl01.py
@@ -207,9 +207,7 @@ def _update_attribute(self, attrid, value):
                 else:
                     self._current_state[STATUS_TYPE_ATTR] = ROTATE_LEFT
                 # show something in the sensor in HA
-                super()._update_attribute(
-                    0, "{}:{}".format(self._current_state[STATUS_TYPE_ATTR], value)
-                )
+                super()._update_attribute(0, value)
                 if self._current_state[STATUS_TYPE_ATTR] is not None:
                     self.listener_event(
                         ZHA_SEND_EVENT,


Test patch:
Repository: zigpy/zha-device-handlers

Issue:
Hue dimmer (rwl020) off short press
Hi,

I have Hue Dimmer controller integrated in Hass Core via ZHA and Bellows (zigpy). The quirk is set to a [long press of the Off button as show here](https://github.com/dmulcahey/zha-device-handlers/blob/5c726a717a4d1dc3930b177f346e852bede9ee63/zhaquirks/philips/rwl021.py#L117). However it seems device is sending this on the short press and not sending any long press for the Off button. The event on Hass is:

```
{
    "event_type": "zha_event",
    "data": {
        "unique_id": "xx:xx:xx:xx:xx:1:0x0006",
        "device_ieee": "xx:xx:xx:xx",
        "endpoint_id": 1,
        "cluster_id": 6,
        "command": "off_with_effect",
        "args": [
            0,
            0
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2020-03-05T05:49:25.119524+00:00",
    "context": {
        "id": "xxxxxxxxxxxx",
        "parent_id": null,
        "user_id": null
    }
}
```
Based on quirk code, it should be `long press` with no args but it is `short press` with `args [0,0]`.

This hue dimmer is with latest firmware (upgraded using Hue bridge before paring dimmer with ZHA).

Thanks.


Discussion:

Resolving patch:
diff --git a/zhaquirks/philips/rwl021.py b/zhaquirks/philips/rwl021.py
--- a/zhaquirks/philips/rwl021.py
+++ b/zhaquirks/philips/rwl021.py
@@ -114,7 +114,7 @@ class PhilipsRWL021(CustomDevice):
 
     device_automation_triggers = {
         (SHORT_PRESS, TURN_ON): {COMMAND: COMMAND_ON},
-        (LONG_PRESS, TURN_OFF): {COMMAND: COMMAND_OFF_WITH_EFFECT},
+        (SHORT_PRESS, TURN_OFF): {COMMAND: COMMAND_OFF_WITH_EFFECT},
         (SHORT_PRESS, DIM_UP): {
             COMMAND: COMMAND_STEP,
             CLUSTER_ID: 8,


Test patch:
Repository: zigpy/zha-device-handlers

Issue:
Update zigpy version to use the new (old module) name for zigpy?
@dmulcahey Ready to update zigpy version to use new (old) module name without -homeassistant suffix?

@Adminiuga in the PR https://github.com/zigpy/zigpy/pull/363 changed the zigpy module name back to just "zigpy" (from "zigpy-homeassistant")

https://github.com/zigpy/zigpy/pull/363/commits/6c9e0e9412a322d4b9558977decf50ca4dfb5ffd

From https://pypi.org/project/zigpy-homeassistant/ back to https://pypi.org/project/zigpy/


Discussion:
For reference, PR #331 just recently updated to use the then latest "zigpy-homeassistant" version.

There are now as of 15th of April 2020 a version 0.20.0 of "zigpy" on https://pypi.org/project/zigpy/

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -24,6 +24,6 @@ def readme():
     keywords="zha quirks homeassistant hass",
     packages=find_packages(exclude=["*.tests"]),
     python_requires=">=3",
-    install_requires=["zigpy-homeassistant>=0.18.1"],
+    install_requires=["zigpy>=0.20.0"],
     tests_require=["pytest"],
 )


Test patch:
Repository: zigpy/zha-device-handlers

Issue:
[BUG] ZHA aquara pressure sensor is not updating 
**Describe the bug**
I'm seeing update messages in the debug logs, but in the pressure is not updating in the ui


**Expected behavior**
measurements in the UI should match values in the logs.

**Screenshots**

![image](https://user-images.githubusercontent.com/2386562/106407791-ef2bae80-640a-11eb-8210-39dab4767026.png)
.

**Additional context**
```
{
  "node_descriptor": "NodeDescriptor(byte1=2, byte2=64, mac_capability_flags=128, manufacturer_code=4151, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=0, maximum_outgoing_transfer_size=100, descriptor_capability_field=0)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0302",
      "in_clusters": [
        "0x0000",
        "0x0001",
        "0x0003",
        "0x0402",
        "0x0403",
        "0x0405",
        "0xffff"
      ],
      "out_clusters": [
        "0x0000",
        "0x0004",
        "0xffff"
      ]
    }
  },
  "manufacturer": "LUMI",
  "model": "lumi.weather",
  "class": "zhaquirks.xiaomi.aqara.weather.Weather2"
}
```

```
2021-01-31 21:27:36 DEBUG (MainThread) [zigpy.zcl] [0x0006:1:0x0403] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=False disable_default_response=True> manufacturer=None tsn=143 command_id=Command.Report_Attributes>
2021-01-31 21:27:36 DEBUG (MainThread) [zigpy.zcl] [0x0006:1:0x0403] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=int16s, value=136>), Attribute(attrid=20, value=<TypeValue type=int8s, value=-1>), Attribute(attrid=16, value=<TypeValue type=int16s, value=1360>)]]
2021-01-31 21:27:36 DEBUG (MainThread) [zigpy.zcl] [0x0006:1:0x0403] Attribute report received: measured_value=136, 20=-1, 16=1360
```


Discussion:
ah, after a bit of digging it appears values outside of the documented range are intentionally ignored  see #296. Given that the sensor appears to be generating useful data < 300hPa, and that the original issue the invalid data was -1, I think expanding the lower bound of acceptable values to 0 makes sense
What are you doing with that sensor?
I got some vacuum storage bags to keep my 3d printing filament dry, and I was curious just how strong a vacuum you could actually pull with the plastic hand pump.

Resolving patch:
diff --git a/zhaquirks/xiaomi/__init__.py b/zhaquirks/xiaomi/__init__.py
--- a/zhaquirks/xiaomi/__init__.py
+++ b/zhaquirks/xiaomi/__init__.py
@@ -393,9 +393,9 @@ def __init__(self, *args, **kwargs):
         self.endpoint.device.pressure_bus.add_listener(self)
 
     def _update_attribute(self, attrid, value):
-        # drop values above and below documented range for this sensor
+        # drop unreasonable values
         # value is in hectopascals
-        if attrid == self.ATTR_ID and (300 <= value <= 1100):
+        if attrid == self.ATTR_ID and (0 <= value <= 1100):
             super()._update_attribute(attrid, value)
 
     def pressure_reported(self, value):


Test patch:
Repository: zigpy/zha-device-handlers

Issue:
[Device Support Request] Lidl _TZ3000_oh7jddmx TS0502A
**Is your feature request related to a problem? Please describe.**
Very similar to #808 I have a LIDL ceiling light panel, which only supports CCT but is incorrectly reported to HA.

**Describe the solution you'd like**
Only exposing the color temperature.

**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, *allocate_address=True, *complex_descriptor_available=False, *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, *is_valid=True, *logical_type=<LogicalType.Router: 1>, *user_descriptor_available=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x010c",
      "in_clusters": [
        "0x0000",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006",
        "0x0008",
        "0x0300",
        "0x1000"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    },
    "242": {
      "profile_id": 41440,
      "device_type": "0x0061",
      "in_clusters": [],
      "out_clusters": [
        "0x0021"
      ]
    }
  },
  "manufacturer": "_TZ3000_oh7jddmx",
  "model": "TS0502A",
  "class": "zigpy.device.Device"
}
```

**Additional context**
I'm assuming adding the signature into
https://github.com/zigpy/zha-device-handlers/blob/b180e4f7ab4a096688f4d4ad9b47ac1b3efa9fe2/zhaquirks/lidl/cct.py#L40-L46
will fix this. ~~I'll test it and open a PR if I find time for it.~~
Update: Successfully tested. PR opened.


Discussion:

Resolving patch:
diff --git a/zhaquirks/lidl/cct.py b/zhaquirks/lidl/cct.py
--- a/zhaquirks/lidl/cct.py
+++ b/zhaquirks/lidl/cct.py
@@ -43,6 +43,7 @@ class CCTLight(CustomDevice):
             ("_TZ3000_9evm3otq", "TS0502A"),
             ("_TZ3000_rylaozuc", "TS0502A"),
             ("_TZ3000_el5kt5im", "TS0502A"),
+            ("_TZ3000_oh7jddmx", "TS0502A"),
         ],
         ENDPOINTS: {
             1: {


Test patch:
Repository: zigpy/zha-device-handlers

Issue:
[Device Support Request] New manufacturerName for DDS238-2 Zigbee
In one chat I got information that from December 2021 this device now is sending with a new manufacturerName attribute: _TZE200_ewxhg6o9. The new version also contains the fix the switch issue (see the details in the #994 thread) and maybe something else, like EnergyFactor attribute.
I can update the quirck but I have no physically the new version of the DDS238-2 device to test, so if someone has the new version of device and can support me with the testing, I can help with the contribution of this update.


Discussion:

Resolving patch:
diff --git a/zhaquirks/tuya/ts0601_din_power.py b/zhaquirks/tuya/ts0601_din_power.py
--- a/zhaquirks/tuya/ts0601_din_power.py
+++ b/zhaquirks/tuya/ts0601_din_power.py
@@ -47,7 +47,9 @@ def _update_attribute(self, attrid, value):
         elif attrid == TUYA_VOLTAGE_ATTR:
             self.endpoint.electrical_measurement.voltage_reported(value / 10)
         elif attrid == TUYA_DIN_SWITCH_ATTR:
-            self.endpoint.device.switch_bus.listener_event(SWITCH_EVENT, attrid, value)
+            self.endpoint.device.switch_bus.listener_event(
+                SWITCH_EVENT, self.endpoint.endpoint_id, value
+            )
 
 
 class TuyaPowerMeasurement(LocalDataCluster, ElectricalMeasurement):
@@ -109,6 +111,7 @@ def __init__(self, *args, **kwargs):
         # output_clusters=[0x000a, 0x0019]
         MODELS_INFO: [
             ("_TZE200_byzdayie", "TS0601"),
+            ("_TZE200_ewxhg6o9", "TS0601"),
         ],
         ENDPOINTS: {
             # <SimpleDescriptor endpoint=1 profile=260 device_type=51


Test patch:
Repository: zigpy/zha-device-handlers

Issue:
[Device Support Request]
**Is your feature request related to a problem? Please describe.**

When my zigbee is discovered (_TZE200_tviaymwx ) by the Zigbee Home Automation integration Home Assistant, it's not properly recognized. Is not using the propew Quirk (TuyaSingleSwitchTO) and thus, is nos showing the proper controls. This is a new variant of the same 1 gang switch.

![image](https://user-images.githubusercontent.com/16512477/154132535-155d3af9-ef5d-4619-ad5e-28887e000553.png)


**Describe the solution you'd like**
I like the device to be discovered properly and with the proper quirkc attached like this other one

![image](https://user-images.githubusercontent.com/16512477/154132803-59650e5e-3210-4db2-9eda-08c502f48a4c.png)


**Device signature - this can be acquired by removing the device from ZHA and pairing it again from the add devices screen. Be sure to add the entire content of the log panel after pairing the device to a code block below this line.**

```
{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, 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=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0051",
      "in_clusters": [
        "0x0000",
        "0x0004",
        "0x0005",
        "0xef00"
      ],
      "out_clusters": [
        "0x000a",
        "0x0019"
      ]
    }
  },
  "manufacturer": "_TZE200_tviaymwx",
  "model": "TS0601",
  "class": "zigpy.device.Device"
}
```

**Additional context**
Add any other context or screenshots about the feature request here.



Discussion:

Resolving patch:
diff --git a/zhaquirks/tuya/ts0601_switch.py b/zhaquirks/tuya/ts0601_switch.py
--- a/zhaquirks/tuya/ts0601_switch.py
+++ b/zhaquirks/tuya/ts0601_switch.py
@@ -81,6 +81,7 @@ class TuyaSingleSwitchTO(TuyaSwitch):
             ("_TZE200_vhy3iakz", "TS0601"),  # ¿1 or 4 gangs?
             ("_TZ3000_uim07oem", "TS0601"),  # ¿1 or 4 gangs?
             ("_TZE200_wfxuhoea", "TS0601"),
+            ("_TZE200_tviaymwx", "TS0601"),
         ],
         ENDPOINTS: {
             1: {


Test patch: