1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Remove modbus duplicate strings (#48654)

* Reuse HA constants for serial configuration.

Reusing HA consts reduces the need for translation.

Sort/group constants in const.

* Change const name ATTR_* to CONF_*

* Correct wrong import

* ATTR_* for service and CONF_* for schemas.

* Revert change to service call.

* Rename CONF_TEMPERATURE -> ATTR_TEMPERATURE

Avoid possible division problem in set_temperature.
This commit is contained in:
jan iversen
2021-04-04 14:02:47 +02:00
committed by GitHub
parent d75f825530
commit 2511e1f229
9 changed files with 66 additions and 84 deletions

View File

@@ -12,7 +12,6 @@ from homeassistant.components.modbus.const import (
CONF_REGISTERS,
CONF_STATE_OFF,
CONF_STATE_ON,
CONF_SWITCHES,
CONF_VERIFY_REGISTER,
CONF_VERIFY_STATE,
)
@@ -24,6 +23,7 @@ from homeassistant.const import (
CONF_DEVICE_CLASS,
CONF_NAME,
CONF_SLAVE,
CONF_SWITCHES,
STATE_OFF,
STATE_ON,
)