Closed gijsh070 closed 8 months ago
It seems to me that this would be an old quirk, but you can try to replace the import statement:
from zhaquirks.tuya.mcu import TuyaManufCluster, TuyaManufClusterAttributes
Thanks for your reply, i tried replacing but still i do not see the sensors or quirk showing up. Probably I need to buy another device that is completely supported in ZHA or I have to move to zigbee2mqtt
Fixed it by moving to mqtt, got way more options for other products as well.
Problem description
Hello,
I bought a CO + CH4 detector. I am trying to get this configured in ZHA with a custom quirk but it seems to mismatch or give error ImportError: attempted relative import with no known parent package.
I am kind of lost in this and hope anyone can suggest some troubleshooting i could do. I see that this device can be converted in zigbee2mqtt but i do not want to move from ZHA to zigbee2mqtt. I have tried different kind of quirks, with the latest one the Moes TS0601.
TS0601 TZE200_iuk8kupi
Solution description
Troubleshooting tips or custom quirk for this device. Any help would be highly appreciated.
Screenshots/Video
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.FullFunctionDevice|MainsPowered|RxOnWhenIdle|AllocateAddress: 142>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, allocate_address=True, is_alternate_pan_coordinator=False, is_coordinator=False, is_end_device=False, is_full_function_device=True, is_mains_powered=True, is_receiver_on_when_idle=True, is_router=True, *is_security_capable=False)", "endpoints": { "1": { "profile_id": "0x0104", "device_type": "0x0051", "input_clusters": [ "0x0000", "0x0004", "0x0005", "0xef00" ], "output_clusters": [ "0x000a", "0x0019" ] }, "242": { "profile_id": "0xa1e0", "device_type": "0x0061", "input_clusters": [], "output_clusters": [ "0x0021" ] } }, "manufacturer": "_TZE200_iuk8kupi", "model": "TS0601", "class": "zigpy.device.Device" }
Diagnostic information
Diagnostic information
```json [Paste the diagnostic information here] ```Logs
Logs
```python [Paste the logs here] ```Custom quirk
"""Gas Sensor.""" import logging
import zigpy.profiles.zha from zigpy.quirks import CustomCluster, CustomDevice import zigpy.types as t from zigpy.zcl.clusters.general import Basic, Groups, Ota, Scenes, Time from zigpy.zcl.clusters.security import IasZone
from zhaquirks import Bus from zhaquirks.const import ( DEVICE_TYPE, ENDPOINTS, INPUT_CLUSTERS, MODELS_INFO, OUTPUT_CLUSTERS, PROFILE_ID, ZONE_STATUS, ZONE_TYPE, )
from . import TuyaManufCluster, TuyaManufClusterAttributes
_LOGGER = logging.getLogger(name)
TUYA_GAS_DETECTED_ATTR = 0x0401 # [0]/[1] [Detected]/[Clear]!
class TuyaGasDetectorCluster(TuyaManufClusterAttributes): """Manufacturer Specific Cluster of the TS0601 gas detector."""
class TuyaGasDetectorZone(CustomCluster, IasZone): """IAS Zone."""
class TuyaGasDetector0601(CustomDevice): """TS0601 _TZE200_iuk8kupi quirk."""
Additional information
No response