2021-11-01 13:51:35 +02:00
|
|
|
from .SmartHome import SmartHome
|
|
|
|
from Command import Command, Response
|
|
|
|
|
2020-11-23 02:25:18 +02:00
|
|
|
################################################################################
|
|
|
|
|
2021-11-01 13:51:35 +02:00
|
|
|
@Command.new(['(открыть|открой) (окно|окна)', ' подними|поднять) (шторы|роллеты)'])
|
|
|
|
def windowOpen(params):
|
2020-11-23 02:25:18 +02:00
|
|
|
SmartHome.send({
|
|
|
|
'target': 'window',
|
|
|
|
'cmd': 'window_open',
|
|
|
|
})
|
2021-04-17 16:18:46 +03:00
|
|
|
voice = text = ''
|
2021-02-21 21:06:00 +02:00
|
|
|
return Response(text = text, voice = voice)
|
2020-11-23 02:25:18 +02:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
2021-11-01 13:51:35 +02:00
|
|
|
@Command.new(['(закрыть|закрой) (окно|окна)', '(опусти|опустить) (шторы|роллеты)'])
|
|
|
|
def windowClose(params):
|
2020-11-23 02:25:18 +02:00
|
|
|
SmartHome.send({
|
|
|
|
'target': 'window',
|
|
|
|
'cmd': 'window_close',
|
|
|
|
})
|
2021-04-17 16:18:46 +03:00
|
|
|
voice = text = ''
|
2021-02-21 21:06:00 +02:00
|
|
|
return Response(text = text, voice = voice)
|