Skip to content

Commit

Permalink
Merge branch 'dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Caius-Bonus authored Sep 13, 2023
2 parents b2c73b2 + 7745c83 commit 279f218
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 2 deletions.
67 changes: 66 additions & 1 deletion zhaquirks/heiman/smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import Alarms, Basic, Identify, Ota, PowerConfiguration
from zigpy.zcl.clusters.general import (
Alarms,
Basic,
Identify,
Ota,
PollControl,
PowerConfiguration,
)
from zigpy.zcl.clusters.homeautomation import Diagnostic
from zigpy.zcl.clusters.security import IasWd, IasZone
import zigpy.zdo.types
Expand Down Expand Up @@ -243,3 +250,61 @@ class HeimanSmokeN30(CustomDevice):
},
},
}


class HeimanSmokeEF30(CustomDevice):
"""SmokeEF30 quirk."""

# 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=4619, 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)
signature = {
MODELS_INFO: [("HEIMAN", "SmokeSensor-EF-3.0")],
ENDPOINTS: {
# "profile_id": "0x0104", "device_type": "0x0402",
# "input_clusters": ["0x0000", "0x0001", "0x0003", "0x0020", "0x0500", "0x0502", "0x0b05"],
# "output_clusters": ["0x0003", "0x0019"]
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.IAS_ZONE,
INPUT_CLUSTERS: [
Basic.cluster_id,
PowerConfiguration.cluster_id,
Identify.cluster_id,
PollControl.cluster_id,
IasZone.cluster_id,
IasWd.cluster_id,
Diagnostic.cluster_id,
],
OUTPUT_CLUSTERS: [
Identify.cluster_id,
Ota.cluster_id,
],
},
},
}

replacement = {
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.IAS_ZONE,
INPUT_CLUSTERS: [
Basic.cluster_id,
PowerConfiguration.cluster_id,
Identify.cluster_id,
PollControl.cluster_id,
IasZone.cluster_id,
Diagnostic.cluster_id,
],
OUTPUT_CLUSTERS: [
Identify.cluster_id,
Ota.cluster_id,
],
},
},
}
3 changes: 2 additions & 1 deletion zhaquirks/tuya/ts0001_fingerbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class OnOffEnchantable(TuyaEnchantableCluster, OnOff):

class TuyaFingerbot(EnchantedDevice):
signature = {
MODELS_INFO: [("_TZ3210_dse8ogfy", "TS0001")],
MODELS_INFO: [("_TZ3210_dse8ogfy", "TS0001"), ("_TZ3210_j4pdtz9v", "TS0001")],
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
Expand All @@ -143,6 +143,7 @@ class TuyaFingerbot(EnchantedDevice):
DEVICE_TYPE: zha.DeviceType.ON_OFF_SWITCH,
INPUT_CLUSTERS: [
Basic.cluster_id,
TuyaPowerConfigurationCluster,
OnOffEnchantable,
TuyaFingerbotCluster,
],
Expand Down

0 comments on commit 279f218

Please sign in to comment.