2021-03-23 00:55:30 +02:00
|
|
|
from .SmartHome import *
|
2021-10-24 22:26:09 +03:00
|
|
|
from ArchieCore import Response
|
2021-11-01 13:51:35 +02:00
|
|
|
|
2021-03-23 00:55:30 +02:00
|
|
|
################################################################################
|
|
|
|
|
2021-11-01 13:51:35 +02:00
|
|
|
@Command.new(['(открыть|открой) (окно|окна)', '(подними|поднять) (шторы|роллеты)'])
|
|
|
|
def mainLight(params):
|
2021-03-23 00:55:30 +02:00
|
|
|
SmartHome.send({
|
|
|
|
'target': 'main_light',
|
|
|
|
'cmd': 'light_on',
|
|
|
|
})
|
|
|
|
voice = text = ''
|
|
|
|
return Response(text = text, voice = voice)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
2021-11-01 13:51:35 +02:00
|
|
|
@Command.new(['включи* подсветку'])
|
|
|
|
def ledOn(params):
|
2021-03-23 00:55:30 +02:00
|
|
|
SmartHome.send({
|
|
|
|
'target': 'led',
|
|
|
|
'cmd': 'led_on',
|
|
|
|
})
|
|
|
|
voice = text = ''
|
|
|
|
return Response(text = text, voice = voice)
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
2021-11-01 13:51:35 +02:00
|
|
|
@Command.new(['выключи* подсветку'])
|
|
|
|
def ledOff(params):
|
2021-03-23 00:55:30 +02:00
|
|
|
SmartHome.send({
|
|
|
|
'target': 'led',
|
|
|
|
'cmd': 'led_off',
|
|
|
|
})
|
|
|
|
voice = text = ''
|
|
|
|
return Response(text = text, voice = voice)
|