Fix tm1651 enum (#6248)

This commit is contained in:
Keith Burzinski
2024-02-20 13:12:08 -06:00
committed by GitHub
parent edd1678463
commit 5ef1bab23e
3 changed files with 18 additions and 10 deletions
+4 -3
View File
@@ -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(