Remove "swap: none" from modbus (#104713)

This commit is contained in:
jan iversen 2023-12-04 14:48:40 +01:00 committed by GitHub
parent 157c4e31df
commit 1629bdcd7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 17 deletions

View file

@ -55,7 +55,6 @@ from .const import (
CONF_STATE_ON,
CONF_SWAP,
CONF_SWAP_BYTE,
CONF_SWAP_NONE,
CONF_SWAP_WORD,
CONF_SWAP_WORD_BYTE,
CONF_VERIFY,
@ -158,8 +157,6 @@ class BaseStructPlatform(BasePlatform, RestoreEntity):
"""Initialize the switch."""
super().__init__(hub, config)
self._swap = config[CONF_SWAP]
if self._swap == CONF_SWAP_NONE:
self._swap = None
self._data_type = config[CONF_DATA_TYPE]
self._structure: str = config[CONF_STRUCTURE]
self._precision = config[CONF_PRECISION]