mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-31 10:08:27 +02:00
Fix tm1651 enum (#6248)
This commit is contained in:
@@ -13,6 +13,7 @@ from esphome.const import (
|
||||
CODEOWNERS = ["@freekode"]
|
||||
|
||||
tm1651_ns = cg.esphome_ns.namespace("tm1651")
|
||||
TM1651Brightness = tm1651_ns.enum("TM1651Brightness")
|
||||
TM1651Display = tm1651_ns.class_("TM1651Display", cg.Component)
|
||||
|
||||
SetLevelPercentAction = tm1651_ns.class_("SetLevelPercentAction", automation.Action)
|
||||
@@ -24,9 +25,9 @@ TurnOffAction = tm1651_ns.class_("SetLevelPercentAction", automation.Action)
|
||||
CONF_LEVEL_PERCENT = "level_percent"
|
||||
|
||||
TM1651_BRIGHTNESS_OPTIONS = {
|
||||
1: TM1651Display.TM1651_BRIGHTNESS_LOW,
|
||||
2: TM1651Display.TM1651_BRIGHTNESS_MEDIUM,
|
||||
3: TM1651Display.TM1651_BRIGHTNESS_HIGH,
|
||||
1: TM1651Brightness.TM1651_BRIGHTNESS_LOW,
|
||||
2: TM1651Brightness.TM1651_BRIGHTNESS_MEDIUM,
|
||||
3: TM1651Brightness.TM1651_BRIGHTNESS_HIGH,
|
||||
}
|
||||
|
||||
CONFIG_SCHEMA = cv.All(
|
||||
|
||||
Reference in New Issue
Block a user