---
# System prepended metadata

title: Untitled

---


##  **IoTLight**

### FROM NLU
    - Entity-Select-All: Optional[str] Default "".  Whether to select all device or not. 
    - IoT-Location-Sum: str. Default "". Where is the device, can be value of ['corridor','desk','kitchen','living room', 'room', 'toilet']. 
    - IoT-Device-Sum: str. Default "". Device name, can be value of ['light','nightlight']. 
    - IoT-Control-Sum: str. Default "". The control applied to device, can be value of ['brightness down','brightness up', 'off','on']. 
    - direction: Optional[str]. Default "". Specify which side of light to be controled. can be value of ['left', 'right'].

### FROM Self-defined
    - success: Boolean.
    - action: str. Default "".

### FROM DB
    - area: List[str].
    - device: str
    - control_spec: 

### Action
> if Select-All
>> if raw['data'] != [] 
>>
>>> payload['control_spec'] = control_spec
>> 
>> else
>>> payload['success'] = False
>>> -> "不好意思，目前還沒有相關的房控裝置"
>>> -> "I'm sorry, I didn't find the device."
>>
> elif Entity_Select_All != ""
>>
>> if raw['data'] != []
>>
>>> payload['control_spec'] = control_spec
>>
>> else
>> 
>>> payload['success'] = False
>>> -> "不好意思，目前還沒有相關的房控裝置"
>>> -> "I'm sorry, I didn't find the device."
>> 
>> if len(loc_list) >= 1
>>> payload['success'] = True
>>> control == "on"
>>>> [str_iot_light_all_lights_level_up]()
>>> 
>>> control == "off"
>>>> [str_iot_light_all_lights_level_down]()
>>>
>>>
>> else
>>> -> "不好意思，目前還沒有相關的房控裝置"
>>> -> "I'm sorry, I didn't find the device."
>
> if location == ""
>> 
>> if control != ""
>>
>>> if raw['data'] != []
>>> 
>>>> payload['control_spec'] = control_spec
>>>> 
>>> else
>>>>
>>>> payload['success'] = False 
>>>> -> "不好意思，目前還沒有相關的房控裝置"
>>>> -> "I'm sorry, I didn't find the device."
>>>>
>>> if len(loc_list) == 1
>>> 
>>>> payload['success'] = True
>>>> area_uni_name = loc_list[0]
>>>
>>> elif len(loc_list) > 1
>>>>
>>>> -> "您要開哪裡的{}呢? ".format(device_uni_name)
>>>> -> "I'm sorry, I didn't find the device."
>>>
>>> else
>>>> -> "不好意思，目前還沒有相關的房控裝置"



---

##  **IoTAC**
### FROM NLU
    - Entity-Select-All: Optional[str] Default "".  Whether to select all device or not. 
    - IoT-Location-Sum: str. Default "". Where is the device, can be value of ['corridor','desk','kitchen','living room', 'room', 'toilet']. 
    - IoT-Device-Sum: str. Default "". Device name, can be value of ['light','nightlight']. 
    - IoT-Control-Sum: str. Default "". The control applied to device, can be value of ['brightness down','brightness up', 'off','on']. 
    - direction: Optional[str]. Default "". Specify which side of light to be controled. can be value of ['left', 'right'].

### FROM Self-defined
    - success: Boolean.
    - action: str. Default "".
    - area: List[str].
    - device: str
    - control_spec: 

### Action
> if location != '':
>> if raw['data'] != []:
>>
>>> payload['control_spec'] = control_spec
>>
>> else
>>> payload['success'] = False
>>> -> "不好意思，目前還沒有相關的房控裝置"
>>> -> "I'm sorry, I didn't find the device."
>>
>> if len(loc_list) == 1
>>> payload['success'] = True
>>>
>>> if control == ""
>>>> if LEVEL_UP_WORD_IN_QUERYTEXT
>>>>> payload['control'] = "level up"
>>>>> -> [response]()
>>>>
>>>> digit = find_digit(param['languageCode'], QueryText)
>>>> if digit != 1
>>>>> payload['temperature'] = digit
>>>>> if _temperature_valid(digit)
>>>>>> -> "好的，為您將{}的{}設定到{}度"
>>>>>> -> "OK sir, {} temperature is set to {} degree"
>>>>>>
>>>>> else
>>>>>> payload['success'] = False
>>>>>> -> "不好意思，溫度只能設定在18到30度之間"
>>>>>> -> "The temperature only can be set between 18 to 30 degrees."
>>>>
>>>> else
>>>>> payload['success'] = False
>>>>> [str_default_fallback]()
>>>>>
>>>>
>>> else
>>>> _ac_resp
>>>> if control == ''
>>>>> payload['success'] = False
>>>
>> else
>>> payload['success'] = False
>>> -> "不好意思，目前還沒有相關的房控裝置"
>>> -> "I'm sorry, I didn't find the device."
>>
>> if len(loc_list) == 1
>>> payload['success'] = True
>>> digit = find_digit(param['languageCode'], st)
>>> if control != ""
>>>> [_ac_resp]()
>>>
>>> elif LEVEL_UP_WORD_IN_QUERYTEXT
>>>> payload['control'] = "level up"
>>>
>>> elif digit != -1:
>>>> payload['temperature'] = digit
>>>> if _temperature_valid(digit)
>>>>> -> "好的，為您將{}的{}設定到{}度"
>>>>> -> "OK sir, {} temperature is set to {} degree"
>>>>
>>>> else
>>>>> payload['success'] = False
>>>>> -> "不好意思，溫度只能設定在18到30度之間"
>>>>> -> "The temperature only can be set between 18 to 30 degrees."
>>>>
>>> else
>>>> [_ac_resp]()
>>>> payload['success'] = False
>>
>> elif len(loc_list) > 1
>>> -> "您要開哪裡的{}呢?，可以跟我說'幫我把{}的{}設24度'"
>>
>> else
>>> "不好意思，目前還沒有相關的房控裝置"
>
> else 
>> if len(loc_list) == 1
>>> payload['success'] = True
>>>
>>> if control != ""
>>>> [_ac_resp]()
>>>
>>> elif digit != -1:
>>>> payload['temperature'] = digit
>>>> resp = "好的，為您將{}的{}設定到{}度"
>>>> resp = "OK sir, {} temperature is set to {} degree"
>>>>
>>>> digit = find_digit(param['languageCode'], QueryText)
>>>> if digit != 1
>>>>> payload['temperature'] = digit
>>>>> if _temperature_valid(digit)
>>>>>> -> "好的，為您將{}的{}設定到{}度"
>>>>>> -> "OK sir, {} temperature is set to {} degree"
>>>>>>
>>>>> else
>>>>>> payload['success'] = False
>>>>>> -> "不好意思，溫度只能設定在18到30度之間"
>>>>>> -> "The temperature only can be set between 18 to 30 degrees."
>>>>
>>>> else
>>>>> payload['success'] = False
>>>>> [str_default_fallback]()
>>>>>
>>>>
>>> else
>>>> _ac_resp
>>>> if control == ''
>>>>> payload['success'] = False
>>>
>> else
>>> payload['success'] = False
>>> -> "不好意思，目前還沒有相關的房控裝置"
>>> -> "I'm sorry, I didn't find the device."
>>
>> if len(loc_list) == 1
>>> payload['success'] = True
>>> digit = find_digit(param['languageCode'], st)
>>> if control != ""
>>>> [_ac_resp]()
>>>
>>> elif LEVEL_UP_WORD_IN_QUERYTEXT
>>>> payload['control'] = "level up"
>>>
>>> elif digit != -1:
>>>> payload['temperature'] = digit
>>>> if _temperature_valid(digit)
>>>>> -> "好的，為您將{}的{}設定到{}度"
>>>>> -> "OK sir, {} temperature is set to {} degree"
>>>>
>>>> else
>>>>> payload['success'] = False
>>>>> -> "不好意思，溫度只能設定在18到30度之間"
>>>>> -> "The temperature only can be set between 18 to 30 degrees."
>>>>
>>> else
>>>> [_ac_resp]()
>>>> payload['success'] = False
>>
>> elif len(loc_list) > 1
>>> -> "您要開哪裡的{}呢?，可以跟我說'幫我把{}的{}設24度'"
>>
>> else
>>> "不好意思，目前還沒有相關的房控裝置"







---

##  **IoTCurtain**
### FROM NLU
    - Entity-Select-All: Optional[str] Default "".  Whether to select all device or not. 
    - IoT-Location-Sum: str. Default "". Where is the device, can be value of ['corridor','desk','kitchen','living room', 'room', 'toilet']. 
    - IoT-Device-Sum: str. Default "". Device name, can be value of ['light','nightlight']. 
    - IoT-Control-Sum: str. Default "". The control applied to device, can be value of ['brightness down','brightness up', 'off','on']. 
    - direction: Optional[str]. Default "". Specify which side of light to be controled. can be value of ['left', 'right'].


### FROM Self-defined
    - success: Boolean.
    - action: str. Default "".
    - area: List[str].
    - device: str
    - control_spec: 


---

##  **IoTTV**
### FROM NLU
    - control
    - channel_number

### FROM Self-defined
    - success: Boolean.
    - action: str. Default "".
    - special_case

---

##  **IoTMode**
### FROM NLU
    - type
    - control
    - location

### FROM Self-defined
    - success: Boolean.
    - action: str. Default "".


* [All slots](/xF7p8ZxaS1adWFVCQh1fEw)