1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-09 03:37:03 +01:00

Add support for Mijia XMWSDJ04MMC

This commit is contained in:
Severin von Wnuck-Lipinski 2024-08-13 19:51:04 +02:00 committed by José Rebelo
parent 8ded52a0d1
commit 96a8b9aeae
3 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,48 @@
/* Copyright (C) 2024 Severin von Wnuck-Lipinski
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 <https://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd;
import java.util.regex.Pattern;
import nodomain.freeyourgadget.gadgetbridge.R;
public class MijiaXmwsdj04Coordinator extends AbstractMijiaLywsdCoordinator {
@Override
protected Pattern getSupportedDeviceName() {
return Pattern.compile("XMWSDJ04MMC");
}
@Override
public int getDeviceNameResource() {
return R.string.devicetype_mijia_xmwsdj04;
}
@Override
public int getDefaultIconResource() {
return R.drawable.ic_device_thermometer;
}
@Override
public int getDisabledIconResource() {
return R.drawable.ic_device_thermometer_disabled;
}
@Override
public boolean supportsSetTime() {
return false;
}
}

View File

@ -191,6 +191,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.makibeshr3.MakibesHR3Coordin
import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaLywsd02Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaLywsd03Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaXmwsdj04Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.mijia_lywsd.MijiaMhoC303Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.miscale.MiSmartScaleCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.miscale.MiCompositionScaleCoordinator;
@ -370,6 +371,7 @@ public enum DeviceType {
PINETIME_JF(PineTimeJFCoordinator.class),
MIJIA_LYWSD02(MijiaLywsd02Coordinator.class),
MIJIA_LYWSD03(MijiaLywsd03Coordinator.class),
MIJIA_XMWSDJ04(MijiaXmwsdj04Coordinator.class),
MIJIA_MHO_C303(MijiaMhoC303Coordinator.class),
LEFUN(LefunDeviceCoordinator.class),
VIVITAR_HR_BP_MONITOR_ACTIVITY_TRACKER(VivitarHrBpMonitorActivityTrackerCoordinator.class),

View File

@ -1750,6 +1750,7 @@
<string name="devicetype_bfh16">BFH-16</string>
<string name="devicetype_mijia_lywsd02">Mijia Smart Clock</string>
<string name="devicetype_mijia_lywsd03">Mijia Temperature and Humidity Sensor 2</string>
<string name="devicetype_mijia_xmwsdj04">Mijia Temperature and Humidity Sensor 2 (E-ink)</string>
<string name="devicetype_mijia_mho_c303">Mijia MHO-C303</string>
<string name="devicetype_makibes_hr3">Makibes HR3</string>
<string name="devicetype_banglejs">Bangle.js</string>