Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tuya temp/humidity sensor _TZE204_s139roas variant #3503

Merged

Conversation

pflorek
Copy link
Contributor

@pflorek pflorek commented Nov 10, 2024

variant has e-ink screen and cr2430 battery. seems to work like the variant without screen. tested by copying to zha.custom_quirks_path

closes #3402

"""Tuya temp and humidity sensors."""

from zhaquirks.tuya.builder import TuyaQuirkBuilder

(
    TuyaQuirkBuilder("_TZE204_s139roas", "TS0601")
    .tuya_temperature(dp_id=1, scale=10)
    .tuya_humidity(dp_id=2)
    .tuya_battery(dp_id=4)
    .skip_configuration()
    .add_to_registry()
)

Proposed change

Additional information

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works

variant has e-ink screen and cr2430 battery. seems to work like the variant without screen. tested by copying to zha.custom_quirks_path

closes zigpy#3402

```python
"""Tuya temp and humidity sensors."""

from zhaquirks.tuya.builder import TuyaQuirkBuilder

(
    TuyaQuirkBuilder("_TZE204_s139roas", "TS0601")
    .tuya_temperature(dp_id=1, scale=10)
    .tuya_humidity(dp_id=2)
    .tuya_battery(dp_id=4)
    .skip_configuration()
    .add_to_registry()
)

```
Copy link

codecov bot commented Nov 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.44%. Comparing base (728ee42) to head (44b6308).
Report is 14 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #3503   +/-   ##
=======================================
  Coverage   89.44%   89.44%           
=======================================
  Files         311      311           
  Lines       10033    10033           
=======================================
  Hits         8974     8974           
  Misses       1059     1059           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@TheJulianJES TheJulianJES added the Tuya Request/PR regarding a Tuya device label Nov 24, 2024
@TheJulianJES TheJulianJES changed the title feat(tuya): add _TZE204_s139roas support Add Tuya temp/humidity sensor _TZE204_s139roas variant Nov 24, 2024
Copy link
Collaborator

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TheJulianJES TheJulianJES merged commit 1bd968c into zigpy:dev Nov 24, 2024
9 checks passed
@DbIsDb
Copy link

DbIsDb commented Dec 4, 2024

Hello guys, is recently buyed the e-ink temerature and humidity zigbee sensor i tried to you ur quirks but i always got this error

2024-12-04 19:27:23.408 INFO (MainThread) [zigpy.device] [0x6633] Read model 'TS0601' and manufacturer '_TZE204_s139roas' from <Endpoint id=1 in=[basic:0x0000, groups:0x0004, scenes:0x0005, None:0xEF00] out=[ota:0x0019, time:0x000A] status=<Status.ZDO_INIT: 1>>
2024-12-04 19:27:23.408 INFO (MainThread) [zigpy.device] [0x6633] Discovered basic device information for
2024-12-04 19:27:23.408 DEBUG (MainThread) [zigpy.application] Device is initialized
2024-12-04 19:27:23.408 DEBUG (MainThread) [zha] Emitting event raw_device_initialized with data RawDeviceInitializedEvent(device_info=RawDeviceInitializedDeviceInfo(ieee=a4:c1:38:45:88:06:4b:5b, nwk=0x6633, pairing_status=<DevicePairingStatus.INTERVIEW_COMPLETE: 2>, model='TS0601', manufacturer='_TZE204_s139roas', signature={'manufacturer': '_TZE204_s139roas', 'model': 'TS0601', 'node_desc': {'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': 4417, 'maximum_buffer_size': 66, 'maximum_incoming_transfer_size': 66, 'server_mask': 10752, 'maximum_outgoing_transfer_size': 66, 'descriptor_capability_field': <DescriptorCapability.NONE: 0>}, 'endpoints': {1: {'profile_id': 260, 'device_type': <DeviceType.SMART_PLUG: 81>, 'input_clusters': [0, 4, 5, 61184], 'output_clusters': [25, 10]}}}), event_type='zha_gateway_message', event='raw_device_initialized') (1 listeners)
2024-12-04 19:27:23.408 DEBUG (MainThread) [zha] (ZHAGatewayProxy) handling event protocol for event: RawDeviceInitializedEvent(device_info=RawDeviceInitializedDeviceInfo(ieee=a4:c1:38:45:88:06:4b:5b, nwk=0x6633, pairing_status=<DevicePairingStatus.INTERVIEW_COMPLETE: 2>, model='TS0601', manufacturer='_TZE204_s139roas', signature={'manufacturer': '_TZE204_s139roas', 'model': 'TS0601', 'node_desc': {'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': 4417, 'maximum_buffer_size': 66, 'maximum_incoming_transfer_size': 66, 'server_mask': 10752, 'maximum_outgoing_transfer_size': 66, 'descriptor_capability_field': <DescriptorCapability.NONE: 0>}, 'endpoints': {1: {'profile_id': 260, 'device_type': <DeviceType.SMART_PLUG: 81>, 'input_clusters': [0, 4, 5, 61184], 'output_clusters': [25, 10]}}}), event_type='zha_gateway_message', event='raw_device_initialized')
2024-12-04 19:27:23.408 DEBUG (MainThread) [zigpy.quirks.registry] Checking quirks for _TZE204_s139roas TS0601 (a4:c1:38:45:88:06:4b:5b)
2024-12-04 19:27:23.409 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.xbee.xbee_io.XBeeSensor'>
2024-12-04 19:27:23.409 DEBUG (MainThread) [zigpy.quirks] Fail because endpoint list mismatch: {232, 230} {1}
2024-12-04 19:27:23.409 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.xbee.xbee3_io.XBee3Sensor'>
2024-12-04 19:27:23.409 DEBUG (MainThread) [zigpy.quirks] Fail because endpoint list mismatch: {232, 230} {1}
2024-12-04 19:27:23.409 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.tuya.ts0201.MoesTemperatureHumidtySensorWithScreen'>
2024-12-04 19:27:23.409 DEBUG (MainThread) [zigpy.quirks] Fail because device_type mismatch on at least one endpoint
2024-12-04 19:27:23.409 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.smartthings.tag_v4.SmartThingsTagV4'>
2024-12-04 19:27:23.409 DEBUG (MainThread) [zigpy.quirks] Fail because device_type mismatch on at least one endpoint
2024-12-04 19:27:23.409 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.smartthings.multi.SmartthingsMultiPurposeSensor'>
2024-12-04 19:27:23.409 DEBUG (MainThread) [zigpy.quirks] Fail because device_type mismatch on at least one endpoint
2024-12-04 19:27:23.409 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.netvox.z308e3ed.Z308E3ED'>
2024-12-04 19:27:23.409 DEBUG (MainThread) [zigpy.quirks] Fail because device_type mismatch on at least one endpoint
2024-12-04 19:27:23.409 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.gledopto.soposhgu10.SoposhGU10'>

image

Do you have some tips ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tuya Request/PR regarding a Tuya device
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Device Support Request] TS0601 by _TZE204_s139roas Miucda/Avatto temp sensor
3 participants