haco/haco/button.py

21 lines
498 B
Python
Raw Normal View History

from haco import schema
2023-08-30 15:17:25 +01:00
from haco.control import Control
class Button(Control):
NAME = 'button'
@classmethod
def get_schema(cls):
return schema.Schema(
capabilities=[
schema.Capability(
ha=schema.HomeAssistant(announce_data=schema.AnnounceTopic(key='{io_ha}_topic')),
tasmota=None
2023-08-30 15:17:25 +01:00
)
]
)
def __init__(self, name, icon=None):
super().__init__(name, icon=icon)