mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-22 09:22:23 +00:00
Fixed more immediate issues
Fixes #272 Fixes #384 Fixes #387 Fixes #389
This commit is contained in:
@@ -125,9 +125,13 @@ public class HassHome implements Home {
|
||||
+ lightId + "state\"}}]";
|
||||
|
||||
} else {
|
||||
HassCommand hassCommand = aGsonHandler.fromJson(anItem.getItem(), HassCommand.class);
|
||||
HassCommand hassCommand = null;
|
||||
if(anItem.getItem().isJsonObject())
|
||||
hassCommand = aGsonHandler.fromJson(anItem.getItem(), HassCommand.class);
|
||||
else
|
||||
hassCommand = aGsonHandler.fromJson(anItem.getItem().getAsString(), HassCommand.class);
|
||||
hassCommand.setBri(BrightnessDecode.replaceIntensityValue(hassCommand.getBri(),
|
||||
BrightnessDecode.calculateIntensity(intensity, targetBri, targetBriInc), false));
|
||||
BrightnessDecode.calculateIntensity(intensity, targetBri, targetBriInc), false));
|
||||
HomeAssistant homeAssistant = getHomeAssistant(hassCommand.getHassName());
|
||||
if (homeAssistant == null) {
|
||||
log.warn("Should not get here, no HomeAssistants available");
|
||||
|
||||
Reference in New Issue
Block a user