Hi guys. I’ve just release a new HA/Tasmota project called haco
( Home Assistant Control Objects)
It lets you define controls for a Tasmota device using Python via a HA Add-On, e.g.
# Expose Tasmota WebLog pulldown menu
from haco import Select, Tasmota
LOG_LEVELS = ["None", "Error", "Info", "Debug", "Debug More"]
weblog = Select('WebLog Level', icon='console', options=LOG_LEVELS)
@weblog.callback()
def ha(value) -> Tasmota[str, 'tasmota.cmd("WebLog "+value)']:
return LOG_LEVELS.index(value)
@weblog.callback(trigger='WebLog')
def tasmota(value: int):
return LOG_LEVELS[value]