Skip to content

Commit 890c5e6

Browse files
committed
Shorten method removing NodeFeature.ENERGY/POWER
1 parent a7e3c68 commit 890c5e6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,10 +1285,9 @@ async def _check_for_energy_and_power_features(
12851285
self._mac_in_str,
12861286
states[NodeFeature.ENERGY],
12871287
)
1288-
remaining_features = tuple(
1289-
f for f in features if f not in {NodeFeature.ENERGY, NodeFeature.POWER}
1290-
)
1291-
return remaining_features, states
1288+
return tuple(
1289+
set(features).difference({NodeFeature.ENERGY, NodeFeature.POWER})
1290+
), states
12921291

12931292
return features, states
12941293

0 commit comments

Comments
 (0)