mirror of
https://github.com/fmtr/haco.git
synced 2026-11-19 22:46:30 -05:00
21 lines
531 B
Python
21 lines
531 B
Python
from haco import schema
|
|
from haco.control import Control
|
|
|
|
|
|
class Button(Control):
|
|
NAME = 'button'
|
|
|
|
@classmethod
|
|
def get_schema(cls):
|
|
return schema.Schema(
|
|
capabilities=[
|
|
schema.Capability(
|
|
name='state',
|
|
ha=schema.HomeAssistant(announce_data=schema.AnnounceTopic(key='{io_ha}_topic')),
|
|
tamota=None
|
|
)
|
|
]
|
|
)
|
|
|
|
def __init__(self, name, icon=None):
|
|
super().__init__(name, icon=icon)
|