mirror of
https://github.com/fmtr/haco.git
synced 2026-10-26 10:51:46 -04:00
Implement Button control
This commit is contained in:
parent
b1cd99609a
commit
ab4540aff4
1 changed files with 21 additions and 0 deletions
21
haco/button.py
Normal file
21
haco/button.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue