Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hdpowerview] Update positions after triggering scene/scene group #11768

Merged
Prev Previous commit
Next Next commit
Compare enum values directly with ==
Signed-off-by: Jacob Laursen <[email protected]>
jlaur committed Dec 12, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit a537c63be1e0b438c7c0602e80c2fbdc01beaab1
Original file line number Diff line number Diff line change
@@ -113,7 +113,7 @@ public HDPowerViewHubHandler(Bridge bridge, HttpClient httpClient,

@Override
public void handleCommand(ChannelUID channelUID, Command command) {
if (RefreshType.REFRESH.equals(command)) {
if (RefreshType.REFRESH == command) {
requestRefreshShadePositions();
return;
}
@@ -129,14 +129,14 @@ public void handleCommand(ChannelUID channelUID, Command command) {
throw new ProcessingException("Web targets not initialized");
}
int id = Integer.parseInt(channelUID.getIdWithoutGroup());
if (sceneChannelTypeUID.equals(channel.getChannelTypeUID()) && OnOffType.ON.equals(command)) {
if (sceneChannelTypeUID.equals(channel.getChannelTypeUID()) && OnOffType.ON == command) {
webTargets.activateScene(id);
pollShades();
} else if (sceneGroupChannelTypeUID.equals(channel.getChannelTypeUID()) && OnOffType.ON.equals(command)) {
} else if (sceneGroupChannelTypeUID.equals(channel.getChannelTypeUID()) && OnOffType.ON == command) {
webTargets.activateSceneCollection(id);
pollShades();
} else if (automationChannelTypeUID.equals(channel.getChannelTypeUID())) {
webTargets.enableScheduledEvent(id, OnOffType.ON.equals(command));
webTargets.enableScheduledEvent(id, OnOffType.ON == command);
}
} catch (HubMaintenanceException e) {
// exceptions are logged in HDPowerViewWebTargets