* Add black

Update pre commit

Update pre commit

add empty line

* Format with black
This commit is contained in:
Guillermo Ruffino
2021-03-07 16:03:16 -03:00
committed by GitHub
parent 2b60b0f1fa
commit 69879920eb
398 changed files with 21624 additions and 12644 deletions
+10 -8
View File
@@ -4,16 +4,18 @@ import esphome.codegen as cg
from esphome.const import CONF_ID, CONF_SWITCH_DATAPOINT
from .. import tuya_ns, CONF_TUYA_ID, Tuya
DEPENDENCIES = ['tuya']
CODEOWNERS = ['@jesserockz']
DEPENDENCIES = ["tuya"]
CODEOWNERS = ["@jesserockz"]
TuyaSwitch = tuya_ns.class_('TuyaSwitch', switch.Switch, cg.Component)
TuyaSwitch = tuya_ns.class_("TuyaSwitch", switch.Switch, cg.Component)
CONFIG_SCHEMA = switch.SWITCH_SCHEMA.extend({
cv.GenerateID(): cv.declare_id(TuyaSwitch),
cv.GenerateID(CONF_TUYA_ID): cv.use_id(Tuya),
cv.Required(CONF_SWITCH_DATAPOINT): cv.uint8_t,
}).extend(cv.COMPONENT_SCHEMA)
CONFIG_SCHEMA = switch.SWITCH_SCHEMA.extend(
{
cv.GenerateID(): cv.declare_id(TuyaSwitch),
cv.GenerateID(CONF_TUYA_ID): cv.use_id(Tuya),
cv.Required(CONF_SWITCH_DATAPOINT): cv.uint8_t,
}
).extend(cv.COMPONENT_SCHEMA)
def to_code(config):