Skip to content

Commit

Permalink
Enable accumulated channels for Shelly Pro 3EM (openhab#16566)
Browse files Browse the repository at this point in the history
Signed-off-by: Leif Bladt <leif.bladt@gmx.de>
Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
  • Loading branch information
leifbladt authored and pgfeller committed Sep 29, 2024
1 parent ba88dc9 commit 2769162
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ public static Map<String, Channel> createDeviceChannels(final Thing thing, final
addChannel(thing, add, profile.settings.sleepTime != null, CHGR_SENSOR, CHANNEL_SENSOR_SLEEPTIME);

// If device has more than 1 meter the channel accumulatedWatts receives the accumulated value
boolean accuChannel = profile.hasRelays && profile.numMeters > 1 && !profile.isRoller && !profile.isRGBW2;
boolean accuChannel = profile.is3EM
|| (profile.hasRelays && profile.numMeters > 1 && !profile.isRoller && !profile.isRGBW2);
addChannel(thing, add, accuChannel, CHGR_DEVST, CHANNEL_DEVST_ACCUWATTS);
addChannel(thing, add, accuChannel, CHGR_DEVST, CHANNEL_DEVST_ACCUTOTAL);
addChannel(thing, add, accuChannel && (status.emeters != null), CHGR_DEVST, CHANNEL_DEVST_ACCURETURNED);
Expand Down

0 comments on commit 2769162

Please sign in to comment.