Fix pydocstyle issues and enable in tox
This commit is contained in:
@@ -94,7 +94,7 @@ def flow_schema(dps):
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Setup a Tuya switch based on a config entry."""
|
||||
"""Set up a Tuya switch based on a config entry."""
|
||||
tuyainterface, entities_to_setup = prepare_setup_entities(config_entry, DOMAIN)
|
||||
if not entities_to_setup:
|
||||
return
|
||||
@@ -152,6 +152,7 @@ class LocaltuyaSwitch(LocalTuyaEntity, SwitchEntity):
|
||||
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Return device state attributes."""
|
||||
attrs = {}
|
||||
if self._config.get(CONF_CURRENT, "-1") != "-1":
|
||||
attrs[ATTR_CURRENT] = self.dps(self._config[CONF_CURRENT])
|
||||
|
Reference in New Issue
Block a user