2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.mihome.internal.handler;
15 import java.util.HashMap;
18 import org.openhab.core.thing.Thing;
21 * Handles the Xiaomi gas sensor device
23 * @author Dieter Schmidt - Initial contribution
25 public class XiaomiSensorGasHandler extends XiaomiSensorBaseAlarmHandler {
27 private static final Map<Integer, String> ALARM_STATUS_MAP = new HashMap<>();
30 ALARM_STATUS_MAP.put(0, "OK");
31 ALARM_STATUS_MAP.put(1, "Gas alarm");
32 ALARM_STATUS_MAP.put(2, "Analog alarm");
33 ALARM_STATUS_MAP.put(64, "Sensitivity fault alarm");
34 ALARM_STATUS_MAP.put(32768, "I2C communication failure");
37 public XiaomiSensorGasHandler(Thing thing) {