Replaced some hardcoded strings with constants and config_entries

This commit is contained in:
rospogrigio
2020-09-18 14:00:36 +02:00
committed by rospogrigio
parent 1a9f7382fc
commit 6f14df2d74
2 changed files with 6 additions and 6 deletions

View File

@@ -275,17 +275,17 @@ class LocaltuyaCover(LocalTuyaEntity, CoverEntity):
def open_cover(self, **kwargs):
"""Open the cover."""
_LOGGER.info("Launching command %s to cover ", self._config[CONF_OPEN_CMD])
_LOGGER.debug("Launching command %s to cover ", self._config[CONF_OPEN_CMD])
self._device.set_dps(self._config[CONF_OPEN_CMD], self._dps_id)
def close_cover(self, **kwargs):
"""Close cover."""
_LOGGER.info("Launching command %s to cover ", self._config[CONF_CLOSE_CMD])
_LOGGER.debug("Launching command %s to cover ", self._config[CONF_CLOSE_CMD])
self._device.set_dps(self._config[CONF_CLOSE_CMD], self._dps_id)
def stop_cover(self, **kwargs):
"""Stop the cover."""
_LOGGER.info("Launching command %s to cover ", self._config[CONF_STOP_CMD])
_LOGGER.debug("Laudebugching command %s to cover ", self._config[CONF_STOP_CMD])
self._device.set_dps(self._config[CONF_STOP_CMD], self._dps_id)
def status_updated(self):