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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 66 additions and 84 deletions

View file

@ -15,6 +15,7 @@ from homeassistant.components.binary_sensor import (
)
from homeassistant.const import (
CONF_ADDRESS,
CONF_BINARY_SENSORS,
CONF_DEVICE_CLASS,
CONF_NAME,
CONF_SCAN_INTERVAL,
@ -31,7 +32,6 @@ from homeassistant.helpers.typing import (
from .const import (
CALL_TYPE_COIL,
CALL_TYPE_DISCRETE,
CONF_BINARY_SENSORS,
CONF_COILS,
CONF_HUB,
CONF_INPUT_TYPE,