File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1279,7 +1279,7 @@ async def _check_for_energy_and_power_features(
12791279 If both are present, execute the related functions in a specific order
12801280 to assure a proper response to the hourly pulses-rollovers.
12811281 """
1282- if {NodeFeature .ENERGY , NodeFeature .POWER } <= features :
1282+ if {NodeFeature .ENERGY , NodeFeature .POWER } <= set ( features ) :
12831283 states [NodeFeature .POWER ] = await self .power_update ()
12841284 _LOGGER .debug (
12851285 "async_get_state %s - power: %s" ,
@@ -1292,10 +1292,9 @@ async def _check_for_energy_and_power_features(
12921292 self ._mac_in_str ,
12931293 states [NodeFeature .ENERGY ],
12941294 )
1295- remaining_features = tuple (
1296- f for f in features if f not in {NodeFeature .ENERGY , NodeFeature .POWER }
1297- )
1298- return remaining_features , states
1295+ return tuple (
1296+ set (features ).difference ({NodeFeature .ENERGY , NodeFeature .POWER })
1297+ ), states
12991298
13001299 return features , states
13011300
You can’t perform that action at this time.
0 commit comments