We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d011f7e commit 28f3c45Copy full SHA for 28f3c45
custom_components/solaredge_modbus_multi/switch.py
@@ -234,10 +234,13 @@ def is_on(self) -> bool:
234
235
async def async_turn_on(self, **kwargs: Any) -> None:
236
_LOGGER.debug(f"set {self.unique_id} to 0x1")
237
- payload = ModbusClientMixin.convert_to_registers(
238
- 0x1, data_type=ModbusClientMixin.DATATYPE.INT32, word_order="little"
+
+ await self._platform.write_registers(
239
+ address=61762,
240
+ payload=ModbusClientMixin.convert_to_registers(
241
+ 0x1, data_type=ModbusClientMixin.DATATYPE.INT32, word_order="little"
242
+ ),
243
)
- await self._platform.write_registers(address=61762, payload=payload)
244
await self.async_update()
245
246
async def async_turn_off(self, **kwargs: Any) -> None:
0 commit comments