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

update aqara airmonitor tvoc for 0.0.0_0029 FW #1598

Merged
merged 2 commits into from
Jun 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions zhaquirks/xiaomi/aqara/tvoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import zigpy.types as t
from zigpy.zcl.clusters.general import AnalogInput, Basic, Identify, Ota
from zigpy.zcl.clusters.measurement import RelativeHumidity, TemperatureMeasurement
from zigpy.zcl.clusters.security import IasZone
from zigpy.zdo.types import NodeDescriptor

from zhaquirks import Bus, LocalDataCluster, PowerConfigurationCluster
Expand Down Expand Up @@ -119,3 +120,36 @@ def __init__(self, *args, **kwargs):
}
},
}


class TVOCMonitor2(XiaomiCustomDevice):
"""Aqara LUMI lumi.airmonitor.acn01."""

def __init__(self, *args, **kwargs):
"""Init."""
self.temperature_bus = Bus()
self.humidity_bus = Bus()
super().__init__(*args, **kwargs)

signature = {
# <SimpleDescriptor endpoint=1 profile=260 device_type=1026
# device_version=1
# input_clusters=[0, 1, 3, 1280]
# output_clusters=[19]>
MODELS_INFO: [(LUMI, "lumi.airmonitor.acn01")],
ENDPOINTS: {
1: {
PROFILE_ID: zha.PROFILE_ID,
DEVICE_TYPE: zha.DeviceType.IAS_ZONE,
INPUT_CLUSTERS: [
Basic.cluster_id,
Identify.cluster_id,
IasZone.cluster_id,
PowerConfigurationCluster.cluster_id,
],
OUTPUT_CLUSTERS: [Ota.cluster_id],
}
},
}

replacement = TVOCMonitor.replacement