From 004be2a331d51315f8b0047e43c64ed059c8496e Mon Sep 17 00:00:00 2001 From: Alex X Date: Wed, 25 Dec 2024 17:34:00 +0300 Subject: [PATCH] Add silence sensor to Aqara smart natural gas detector JT-BZ-01AQ/A #1519 --- custom_components/xiaomi_gateway3/core/devices.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/custom_components/xiaomi_gateway3/core/devices.py b/custom_components/xiaomi_gateway3/core/devices.py index e3b852c6..7e54ec6a 100644 --- a/custom_components/xiaomi_gateway3/core/devices.py +++ b/custom_components/xiaomi_gateway3/core/devices.py @@ -996,10 +996,11 @@ "lumi.sensor_gas.acn02": ["Aqara", "Gas Sensor", "JT-BZ-01AQ/A"], "spec": [ MapConv("status", "sensor", mi="2.p.1", map={0: "Normal Monitoring", 1: "Alarm", 2: "Fault", 3: "Warm Up", 4: "End Of Life"}), - BoolConv("fault", "binary_sensor", mi="2.p.2"), # diagnostic BaseConv("gas_density", "sensor", mi="2.p.3"), # percentage - MapConv("sensitivity", "select", mi="5.p.1", map={1: "LEL15", 2: "LEL10"}), # config - BaseConv("remain_days", "sensor", mi="9.p.1"), + MapConv("sensitivity", "select", mi="5.p.1", map={1: "LEL15", 2: "LEL10"}, entity=ENTITY_CONFIG), # config + BoolConv("fault", "binary_sensor", mi="2.p.2", entity=ENTITY_DIAGNOSTIC), # diagnostic + BoolConv("silence", "binary_sensor", mi="7.p.1", entity=ENTITY_DIAGNOSTIC), + BaseConv("remain_days", "sensor", mi="9.p.1", entity=ENTITY_DIAGNOSTIC), ], }, { "lumi.light.acn014": ["Aqara", "Bulb T1", "ZNLDP14LM"],