1
0
mirror of https://github.com/MarkParker5/STARK.git synced 2025-07-02 22:36:54 +02:00
Files
STARK/Features/SmartHome/window.py
2021-08-21 02:09:37 +03:00

32 lines
1.0 KiB
Python

from .SmartHome import *
from Command import Response
################################################################################
def method(params):
SmartHome.send({
'target': 'window',
'cmd': 'window_open',
})
voice = text = ''
return Response(text = text, voice = voice)
keywords = {}
patterns = ['* (открыть|открой) (окно|окна) *', '* (подними|поднять) (шторы|роллеты) *']
window_open = SmartHome('window_open', keywords, patterns)
window_open.setStart(method)
################################################################################
def method(params):
SmartHome.send({
'target': 'window',
'cmd': 'window_close',
})
voice = text = ''
return Response(text = text, voice = voice)
keywords = {}
patterns = ['* (закрыть|закрой) (окно|окна) *', '* (опусти|опустить) (шторы|роллеты) *']
window_close = SmartHome('window_close', keywords, patterns)
window_close.setStart(method)