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 @@ -1272,7 +1272,7 @@ async def _check_for_energy_and_power_features(
12721272 If both are present, execute the related functions in a specific order
12731273 to assure a proper response to the hourly pulses-rollovers.
12741274 """
1275- if {NodeFeature .ENERGY , NodeFeature .POWER } <= features :
1275+ if {NodeFeature .ENERGY , NodeFeature .POWER } <= set ( features ) :
12761276 states [NodeFeature .POWER ] = await self .power_update ()
12771277 _LOGGER .debug (
12781278 "async_get_state %s - power: %s" ,
@@ -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
You can’t perform that action at this time.
0 commit comments