diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/mijia_lywsd/MijiaMhoC303Coordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/mijia_lywsd/MijiaMhoC303Coordinator.java new file mode 100644 index 000000000..faa99669c --- /dev/null +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/mijia_lywsd/MijiaMhoC303Coordinator.java @@ -0,0 +1,48 @@ +/* Copyright (C) 2024 José Rebelo + + This file is part of Gadgetbridge. + + Gadgetbridge is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Gadgetbridge is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . */ +package nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd; + +import java.util.regex.Pattern; + +import nodomain.freeyourgadget.gadgetbridge.R; + +public class MijiaMhoC303Coordinator extends AbstractMijiaLywsdCoordinator { + @Override + protected Pattern getSupportedDeviceName() { + return Pattern.compile("MHO-C303"); + } + + @Override + public int getDeviceNameResource() { + return R.string.devicetype_mijia_mho_c303; + } + + @Override + public int getDefaultIconResource() { + return R.drawable.ic_device_pebble; + } + + @Override + public int getDisabledIconResource() { + return R.drawable.ic_device_pebble_disabled; + } + + @Override + public boolean supportsSetTime() { + return true; + } +} diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java index 120ae4244..10d295a98 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java @@ -130,6 +130,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.lenovo.watchxplus.WatchXPlus import nodomain.freeyourgadget.gadgetbridge.devices.liveview.LiveviewCoordinator; import nodomain.freeyourgadget.gadgetbridge.devices.makibeshr3.MakibesHR3Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandCoordinator; +import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaMhoC303Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaLywsd02Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaLywsd03Coordinator; import nodomain.freeyourgadget.gadgetbridge.devices.miscale2.MiScale2DeviceCoordinator; @@ -284,6 +285,7 @@ public enum DeviceType { PINETIME_JF(PineTimeJFCoordinator.class), MIJIA_LYWSD02(MijiaLywsd02Coordinator.class), MIJIA_LYWSD03(MijiaLywsd03Coordinator.class), + MIJIA_MHO_C303(MijiaMhoC303Coordinator.class), LEFUN(LefunDeviceCoordinator.class), BOHEMIC_SMART_BRACELET(BohemicSmartBraceletDeviceCoordinator.class), SMAQ2OSS(SMAQ2OSSCoordinator.class), diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7b7e164b4..cfebc8ade 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1411,6 +1411,7 @@ BFH-16 Mijia Smart Clock Mijia Temperature and Humidity Sensor 2 + Mijia MHO-C303 Makibes HR3 Bangle.js TLW64