Huawei: replace magic numbers with constants

This commit is contained in:
Me7c7
2025-10-03 16:22:19 +03:00
parent f870704983
commit 17ef03452f
2 changed files with 2 additions and 2 deletions
@@ -600,7 +600,7 @@ public class AsynchronousResponse {
} }
private void handleWeatherCheck(HuaweiPacket response) { private void handleWeatherCheck(HuaweiPacket response) {
if (response.serviceId == Weather.id && response.commandId == 0x04) { if (response.serviceId == Weather.id && response.commandId == Weather.WeatherDeviceRequest.id) {
support.huaweiWeatherManager.handleAsyncMessage(response); support.huaweiWeatherManager.handleAsyncMessage(response);
} }
} }
@@ -28,7 +28,7 @@ public class SendWeatherDeviceRequest extends Request {
public SendWeatherDeviceRequest(HuaweiSupportProvider support) { public SendWeatherDeviceRequest(HuaweiSupportProvider support) {
super(support); super(support);
this.serviceId = Weather.id; this.serviceId = Weather.id;
this.commandId = 0x04; this.commandId = Weather.WeatherDeviceRequest.id;
this.addToResponse = false; // Handled in async response this.addToResponse = false; // Handled in async response
} }