Eliminate risk of bad firmware response breaking shade/scene updates. (#12214)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
parent
b9a838bf18
commit
e9deeccf49
@ -170,6 +170,7 @@ public class HDPowerViewHubHandler extends BaseBridgeHandler {
|
|||||||
hardRefreshPositionInterval = config.hardRefresh;
|
hardRefreshPositionInterval = config.hardRefresh;
|
||||||
hardRefreshBatteryLevelInterval = config.hardRefreshBatteryLevel;
|
hardRefreshBatteryLevelInterval = config.hardRefreshBatteryLevel;
|
||||||
initializeChannels();
|
initializeChannels();
|
||||||
|
firmwareVersions = null;
|
||||||
schedulePoll();
|
schedulePoll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -282,8 +283,13 @@ public class HDPowerViewHubHandler extends BaseBridgeHandler {
|
|||||||
|
|
||||||
private synchronized void poll() {
|
private synchronized void poll() {
|
||||||
try {
|
try {
|
||||||
logger.debug("Polling for state");
|
|
||||||
updateFirmwareProperties();
|
updateFirmwareProperties();
|
||||||
|
} catch (HubException e) {
|
||||||
|
logger.warn("Failed to update firmware properties: {}", e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
logger.debug("Polling for state");
|
||||||
pollShades();
|
pollShades();
|
||||||
|
|
||||||
List<Scene> scenes = updateSceneChannels();
|
List<Scene> scenes = updateSceneChannels();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user