Skip to content

Commit

Permalink
Grid control is INT32
Browse files Browse the repository at this point in the history
  • Loading branch information
WillCodeForCats committed Feb 6, 2025
1 parent 0f7f247 commit 04a563b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/solaredge_modbus_multi/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def is_on(self) -> bool:
async def async_turn_on(self, **kwargs: Any) -> None:
_LOGGER.debug(f"set {self.unique_id} to 0x1")
payload = ModbusClientMixin.convert_to_registers(
0x1, data_type=ModbusClientMixin.DATATYPE.UINT32, word_order="little"
0x1, data_type=ModbusClientMixin.DATATYPE.INT32, word_order="little"
)
await self._platform.write_registers(address=61762, payload=payload)
await self.async_update()
Expand All @@ -236,7 +236,7 @@ async def async_turn_off(self, **kwargs: Any) -> None:
await self._platform.write_registers(
address=61762,
payload=ModbusClientMixin.convert_to_registers(
0x0, data_type=ModbusClientMixin.DATATYPE.UINT32, word_order="little"
0x0, data_type=ModbusClientMixin.DATATYPE.INT32, word_order="little"
),
)
await self.async_update()

0 comments on commit 04a563b

Please sign in to comment.