mirror of
https://github.com/esphome/esphome.git
synced 2025-09-17 10:42:21 +01:00
Cleanup dashboard JS (#491)
* Cleanup dashboard JS * Add vscode * Save start_mark/end_mark * Updates * Updates * Remove need for cv.nameable It's a bit hacky but removes so much bloat from integrations * Add enum helper * Document APIs, and Improvements * Fixes * Fixes * Update PULL_REQUEST_TEMPLATE.md * Updates * Updates * Updates
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components import lcd_base, i2c
|
||||
from esphome.const import CONF_ID, CONF_UPDATE_INTERVAL
|
||||
from esphome.const import CONF_ID
|
||||
|
||||
DEPENDENCIES = ['i2c']
|
||||
AUTO_LOAD = ['lcd_base']
|
||||
@@ -10,11 +10,11 @@ lcd_pcf8574_ns = cg.esphome_ns.namespace('lcd_pcf8574')
|
||||
PCF8574LCDDisplay = lcd_pcf8574_ns.class_('PCF8574LCDDisplay', lcd_base.LCDDisplay, i2c.I2CDevice)
|
||||
|
||||
CONFIG_SCHEMA = lcd_base.LCD_SCHEMA.extend({
|
||||
cv.GenerateID(): cv.declare_variable_id(PCF8574LCDDisplay),
|
||||
cv.GenerateID(): cv.declare_id(PCF8574LCDDisplay),
|
||||
}).extend(i2c.i2c_device_schema(0x3F))
|
||||
|
||||
|
||||
def to_code(config):
|
||||
var = cg.new_Pvariable(config[CONF_ID], config[CONF_UPDATE_INTERVAL])
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
yield lcd_base.setup_lcd_display(var, config)
|
||||
yield i2c.register_i2c_device(var, config)
|
||||
|
Reference in New Issue
Block a user