Skip to content

Commit b0730a3

Browse files
committed
Disable get_state for NodeFeature.ENERGY
should be triggered by getting NodeFeature POWER
1 parent 3486344 commit b0730a3

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,13 +1230,14 @@ async def get_state(self, features: tuple[NodeFeature]) -> dict[NodeFeature, Any
12301230
)
12311231

12321232
match feature:
1233-
case NodeFeature.ENERGY:
1234-
states[feature] = await self.energy_update()
1235-
_LOGGER.debug(
1236-
"async_get_state %s - energy: %s",
1237-
self._mac_in_str,
1238-
states[feature],
1239-
)
1233+
# Disable, getting NodeFeature.POWER will trigger an energy_update
1234+
# case NodeFeature.ENERGY:
1235+
# states[feature] = await self.energy_update()
1236+
# _LOGGER.debug(
1237+
# "async_get_state %s - energy: %s",
1238+
# self._mac_in_str,
1239+
# states[feature],
1240+
# )
12401241
case NodeFeature.RELAY:
12411242
states[feature] = self._relay_state
12421243
_LOGGER.debug(

0 commit comments

Comments
 (0)