Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NE]Added Light and Fan Intents #2762

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions responses/ne/HassTurnOff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ responses:
light_all: "मैले सम्पूर्ण बत्तीहरु निबाइदिएको छु"
fan: "मैले पंखा बन्द गरिदिएको छु"
fans_area: "मैले पंखाहरु बन्द गरिदिएको छु"
fans_floor: "मैले पंखाहरु बन्द गरिदिएको छु"
fan_all: "मैले सम्पूर्ण पंखाहरु बन्द गरिदिएको छु"
cover: "मैले पर्दा लगाइदिएको छु"
cover_device_class: "मैले {{ slots.device_class }} लगाइदिएको छु"
scene: "मैले सिन बन्द गरिदिएको छु"
Expand Down
10 changes: 6 additions & 4 deletions responses/ne/HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ responses:
"weather": "मौसम जानकारी"
} %}
मैले {{ translations.get(state.domain) }} अन गरिदिएको छु
light: "मैले बत्ती बलिदिएको छु"
lights_area: "मैले बत्तीहरु बलिदिएको छु"
lights_floor: "मैले बत्तीहरु बलिदिएको छु"
light_all: "मैले सम्पूर्ण बत्तीहरु बलिदिएको छु"
light: "मैले बत्ती बालिदिएको छु"
lights_area: "मैले बत्तीहरु बालिदिएको छु"
lights_floor: "मैले बत्तीहरु बालिदिएको छु"
light_all: "मैले सम्पूर्ण बत्तीहरु बालिदिएको छु"
fan: "मैले पंखा चालु गरिदिएको छु"
fans_area: "मैले पंखाहरु चालु गरिदिएको छु"
fans_floor: "मैले पंखाहरु चालु गरिदिएको छु"
fan_all: "मैले सम्पूर्ण पंखाहरु चालु गरिदिएको छु"
cover: "मैले पर्दा खोलिदैएको छु"
cover_device_class: "मैले {{ slots.device_class }} खोलिदैएको छु"
scene: "मैले सिन सुरु गरिदिएको छु"
Expand Down
13 changes: 10 additions & 3 deletions sentences/ne/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,8 @@ lists:

expansion_rules:
name: "{name}"
area: "{area}[ कोठा| क्षेत्र| कक्क्ष][को|मा| भित्र| भित्रको]"
floor: "{floor}[ तल्ला| तह| फ्लोर][को|मा| भित्र| भित्रको]"
area: "{area}[ कोठा| क्षेत्र| कक्क्ष][को|मा[ भऐको]| भित्र| भित्रको]"
floor: "{floor}[ तल्ला| तह| फ्लोर][को|मा[ भऐको]| भित्र| भित्रको]"
area_floor: "(<area>|<floor>)"
सबै: "(सबै|सम्पूर्ण|भ[ऐ/ये] भरको|पुरा|पुरै)"
गर्नु: "(गर्नु|गर्दिनु[होस|होस्‌|स|स्‌]|ग(र|र्‌‌‌‌‌)|गर्दे[उ|ऊ])[न| न]"
Expand All @@ -640,7 +640,14 @@ expansion_rules:
बनाउनु: "(बनाउनु|बनाइदिनु[होस|होस्‌|स|स्‌]|ब(ना[उ|ऊ])|बनाइदे[उ|ऊ])[न| न]"
खोल्नु: "((खोल्नु|खोल्दिनु[होस|होस्‌|स|स्‌]|खो(ल|ल्‌)|खोल्दे[उ|ऊ])[न| न])"
पार्नु: "((पार्नु|पार्दिनु[होस|होस्‌|स|स्‌]|पा(र|र्‌)|पार्दे[उ|ऊ])[न| न])"
बत्ती: "(बत्ती[हरु]|बत्ति[हरु]|झिलिमिलि[हरु]|(ला(इ|ई)ट)[हरु]|बल्ब[हरु])"
बत्ती: "(बत्ती[हरु]|बत्ति[हरु]|(ला(इ|ई)ट)[हरु]|बल्ब[हरु])"
पंखा: "(पंखा|फ्यान)[हरु]"
उज्यालो: "उज्यालो|चकिलो|चकीलो|झिलिमिलि"
अँध्यारो: "अँध्यारो"
घर: "(घर|फल्याट)[को|मा[ भऐको]| भित्र| भित्रको]"
सबैतिर: "[<घर>] ((सबै(ति|ती)र)|(जताततै)|([<सबै> ](कोठा|क्षेत्र|कक्क्ष|तल्ला|तह|फ्लोर)[हरु]))"
सबैतिरको: "[<घर>] ((सबै(ति|ती)र[को])[ <सबै>]|(जताततै[को])|([<सबै> ](कोठा|क्षेत्र|कक्क्ष|तल्ला|तह|फ्लोर)[हरु][को|मा[ भऐको]| भित्र| भित्रको])‌)"
यहाँ: "(यहाँ|एता[( ति| ती)र]|य(हीँ|हिँ))[को|मा[ भऐको]| भित्र| भित्रको]"
skip_words:
- "यो"
- "त्यो"
Expand Down
50 changes: 50 additions & 0 deletions sentences/ne/fan_HassTurnOff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
language: "ne"
intents:
HassTurnOff:
data:
# Turn on a specific fan
- sentences:
- "[<area_floor>] <name> [<पंखा>] (<निबाउनु>|<हान्नु>|<मार्नु>)"
- "[<area_floor>] <name> [<पंखा>] (अफ|बन्द) [<गर्नु>|<हान्नु>]"
requires_context:
domain: "fan"
response: "fan"

# Turn on all fans in an area
- sentences:
- "<area> [<सबै>] <पंखा> (<निबाउनु>|<हान्नु>|<मार्नु>)"
- "<area> [<सबै>] <पंखा> (अफ|बन्द) [<गर्नु>|<हान्नु>]"
slots:
domain: "fan"
response: "fans_area"

# Turn on all fans on a floor
- sentences:
- "<floor> [<सबै>] <पंखा> (<निबाउनु>|<हान्नु>|<मार्नु>)"
- "<floor> [<सबै>] <पंखा> (अफ|बन्द) [<गर्नु>|<हान्नु>]"
response: "fans_floor"
slots:
domain: "fan"

# Turn on all fans in the home
- sentences:
- "<सबैतिरको> <पंखा> (<निबाउनु>|<हान्नु>|<मार्नु>)"
- "<सबैतिरको> <पंखा> (अफ|बन्द) [<गर्नु>|<हान्नु>]"
- "<घर> [<सबै>] <पंखा> (<निबाउनु>|<हान्नु>|<मार्नु>)"
- "<घर> [<सबै>] <पंखा> (अफ|बन्द) [<गर्नु>|<हान्नु>]"
response: "fan_all"
slots:
domain: "fan"

# Turn on fans in the same area as a satellite device
- sentences:
- "[<यहाँ>] [<सबै>] <पंखा> (<निबाउनु>|<हान्नु>|<मार्नु>)"
- "[<यहाँ>] [<सबै>] <पंखा> (अफ|बन्द) [<गर्नु>|<हान्नु>]"

response: "fans_area"
slots:
domain: "fan"
requires_context:
area:
slot: true
49 changes: 49 additions & 0 deletions sentences/ne/fan_HassTurnOn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
language: "ne"
intents:
HassTurnOn:
data:
# Turn on a specific fan
- sentences:
- "[<area_floor>] <name> [<पंखा>] (<बाल्नु>|<खोल्नु>)"
- "[<area_floor>] <name> [<पंखा>] (अन|चालु|सुरु) [<गर्नु>|<हान्नु>]"
requires_context:
domain: "fan"
response: "fan"
# Turn on all fans in an area
- sentences:
- "<area> [<सबै>] <पंखा> (<बाल्नु>|<खोल्नु>)"
- "<area> [<सबै>] <पंखा> (अन|चालु|सुरु) [<गर्नु>|<हान्नु>]"
slots:
domain: "fan"
response: "fans_area"

# Turn on all fans on a floor
- sentences:
- "<floor> [<सबै>] <पंखा> (<बाल्नु>|<खोल्नु>)"
- "<floor> [<सबै>] <पंखा> (अन|चालु|सुरु) [<गर्नु>|<हान्नु>]"
response: "fans_floor"
slots:
domain: "fan"

# Turn on all fans in the home
- sentences:
- "<सबैतिरको> <पंखा> (<बाल्नु>|<खोल्नु>)"
- "<सबैतिरको> <पंखा> (अन|चालु|सुरु) [<गर्नु>|<हान्नु>]"
- "<घर> [<सबै>] <पंखा> (<बाल्नु>|<खोल्नु>)"
- "<घर> [<सबै>] <पंखा> (अन|चालु|सुरु) [<गर्नु>|<हान्नु>]"
response: "fan_all"
slots:
domain: "fan"

# Turn on fans in the same area as a satellite device
- sentences:
- "[<यहाँ>] [<सबै>] <पंखा> (<बाल्नु>|<खोल्नु>)"
- "[<यहाँ>] [<सबै>] <पंखा> (अन|चालु|सुरु) [<गर्नु>|<हान्नु>]"

response: "fans_area"
slots:
domain: "fan"
requires_context:
area:
slot: true
5 changes: 4 additions & 1 deletion sentences/ne/homeassistant_HassTurnOff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ intents:
HassTurnOff:
data:
- sentences:
- "(<floor> <name>|<area> <name>|<name>) (<निबाउनु>|<हान्नु>|<मार्नु>|<लगाउनु>|अफ [<गर्नु>|<हान्नु>]|बन्द [<गर्नु>])"
- "(<floor> <name>|<area> <name>|<name>) (<निबाउनु>|<हान्नु>|<मार्नु>|<लगाउनु>)"
- "(<floor> <name>|<area> <name>|<name>) (अफ|बन्द) [<गर्नु>|<हान्नु>]"
excludes_context:
domain:
- fan
- light
- binary_sensor
- cover
- lock
Expand Down
5 changes: 4 additions & 1 deletion sentences/ne/homeassistant_HassTurnOn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ intents:
HassTurnOn:
data:
- sentences:
- "(<floor> <name>|<area> <name>|<name>) (<बाल्नु>|<लगाउनु>|<खोल्नु>|अन [<गर्नु>|<हान्नु>]|सुरु [<गर्नु>|<हान्नु>])"
- "(<floor> <name>|<area> <name>|<name>) (<बाल्नु>|<लगाउनु>|<खोल्नु>)"
- "(<floor> <name>|<area> <name>|<name>) (अन|चालु|सुरु) [<गर्नु>|<हान्नु>]"
excludes_context:
domain:
- fan
- light
- binary_sensor
- cover
- lock
Expand Down
55 changes: 55 additions & 0 deletions sentences/ne/light_HassTurnOff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
language: "ne"
intents:
HassTurnOff:
data:
# Turn on a specific light
- sentences:
- "[<area_floor>] <name> [<बत्ती>] (<निबाउनु>|<हान्नु>|<मार्नु>)"
- "[<area_floor>] <name> [<बत्ती>] (अफ|बन्द) [<गर्नु>|<हान्नु>]"
requires_context:
domain: "light"
response: "light"

# Turn on all lights in an area
- sentences:
- "<area> <अँध्यारो> (<बनाउनु>|<पार्नु>)"
- "<area> [<सबै>] <बत्ती> (<निबाउनु>|<हान्नु>|<मार्नु>)"
- "<area> [<सबै>] <बत्ती> (अफ|बन्द) [<गर्नु>|<हान्नु>]"
slots:
domain: "light"
response: "lights_area"

# Turn on all lights on a floor
- sentences:
- "<floor> <अँध्यारो> (<बनाउनु>|<पार्नु>)"
- "<floor> [<सबै>] <बत्ती> (<निबाउनु>|<हान्नु>|<मार्नु>)"
- "<floor> [<सबै>] <बत्ती> (अफ|बन्द) [<गर्नु>|<हान्नु>]"
response: "lights_floor"
slots:
domain: "light"

# Turn on all lights in the home
- sentences:
- "<सबैतिर> <अँध्यारो> (<बनाउनु>|<पार्नु>)"
- "<घर> <अँध्यारो> (<बनाउनु>|<पार्नु>)"
- "<सबैतिरको> <बत्ती> (<निबाउनु>|<हान्नु>|<मार्नु>)"
- "<सबैतिरको> <बत्ती> (अफ|बन्द) [<गर्नु>|<हान्नु>]"
- "<घर> [<सबै>] <बत्ती> (<निबाउनु>|<हान्नु>|<मार्नु>)"
- "<घर> [<सबै>] <बत्ती> (अफ|बन्द) [<गर्नु>|<हान्नु>]"
response: "light_all"
slots:
domain: "light"

# Turn on lights in the same area as a satellite device
- sentences:
- "[<यहाँ>] <अँध्यारो> (<बनाउनु>|<पार्नु>)"
- "[<यहाँ>] [<सबै>] <बत्ती> (<निबाउनु>|<हान्नु>|<मार्नु>)"
- "[<यहाँ>] [<सबै>] <बत्ती> (अफ|बन्द) [<गर्नु>|<हान्नु>]"

response: "lights_area"
slots:
domain: "light"
requires_context:
area:
slot: true
54 changes: 54 additions & 0 deletions sentences/ne/light_HassTurnOn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
language: "ne"
intents:
HassTurnOn:
data:
# Turn on a specific light
- sentences:
- "[<area_floor>] <name> [<बत्ती>] (<बाल्नु>|<खोल्नु>)"
- "[<area_floor>] <name> [<बत्ती>] (अन|चालु|सुरु) [<गर्नु>|<हान्नु>]"
requires_context:
domain: "light"
response: "light"
# Turn on all lights in an area
- sentences:
- "<area> <उज्यालो> (<बनाउनु>|<पार्नु>)"
- "<area> [<सबै>] <बत्ती> (<बाल्नु>|<खोल्नु>)"
- "<area> [<सबै>] <बत्ती> (अन|चालु|सुरु) [<गर्नु>|<हान्नु>]"
slots:
domain: "light"
response: "lights_area"

# Turn on all lights on a floor
- sentences:
- "<floor> <उज्यालो> (<बनाउनु>|<पार्नु>)"
- "<floor> [<सबै>] <बत्ती> (<बाल्नु>|<खोल्नु>)"
- "<floor> [<सबै>] <बत्ती> (अन|चालु|सुरु) [<गर्नु>|<हान्नु>]"
response: "lights_floor"
slots:
domain: "light"

# Turn on all lights in the home
- sentences:
- "<सबैतिर> <उज्यालो> (<बनाउनु>|<पार्नु>)"
- "<घर> <उज्यालो> (<बनाउनु>|<पार्नु>)"
- "<सबैतिरको> <बत्ती> (<बाल्नु>|<खोल्नु>)"
- "<सबैतिरको> <बत्ती> (अन|चालु|सुरु) [<गर्नु>|<हान्नु>]"
- "<घर> [<सबै>] <बत्ती> (<बाल्नु>|<खोल्नु>)"
- "<घर> [<सबै>] <बत्ती> (अन|चालु|सुरु) [<गर्नु>|<हान्नु>]"
response: "light_all"
slots:
domain: "light"

# Turn on lights in the same area as a satellite device
- sentences:
- "[<यहाँ>] <उज्यालो> (<बनाउनु>|<पार्नु>)"
- "[<यहाँ>] [<सबै>] <बत्ती> (<बाल्नु>|<खोल्नु>)"
- "[<यहाँ>] [<सबै>] <बत्ती> (अन|चालु|सुरु) [<गर्नु>|<हान्नु>]"

response: "lights_area"
slots:
domain: "light"
requires_context:
area:
slot: true
65 changes: 56 additions & 9 deletions tests/ne/_fixtures.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,67 @@
language: ne
floors:
- name: "माथिल्लो तल्ला"
id: "upstairs_id"
- name: "भुई"
id: "ground_floor_id"
- name: "पहिलो तल्ला"
id: "first_floor_id"
- name: "दोस्रो तल्ला"
id: "second_floor_id"

areas:
- name: भान्छा
id: kitchen
- name: बैठक कोठा
id: living_room
- name: सुत्ने
id: bedroom
id: kitchen_id
floor: "upstairs_id"
- name: बैठक
id: living_room_id
floor: "first_floor_id"
- name: सुत्ने कोठा
id: bedroom_id
floor: "second_floor_id"
- name: गराज
id: garage
id: garage_id
floor: "ground_floor_id"
entities:
- name: सुत्ने कोठाको बत्ती
id: light.bedroom_lamp
area: bedroom
area: bedroom_id
state: "off"

- name: "सुत्ने कोठाको स्विच"
id: "switch.bedroom"
area: "bedroom_id"
state: "off"

- name: भान्छाको स्विच
id: switch.kitchen
area: kitchen
area: kitchen_id

- name: बैठकको पंखा
id: fan.ceiling
area: living_room
area: living_room_id

- name: "टेबल"
id: "light.kitchen_countertop"
area: "kitchen_id"
state: "on"

- name: "भान्छाको पंखा"
id: "fan.kitchen_ceiling"
area: "kitchen_id"
state: "on"

- name: "भान्छाको दराज"
id: "light.kitchen_cabinets"
area: "kitchen_id"
state: "on"

- name: "बैठकको बल्ब"
id: "light.living_room_lamp"
area: "living_room_id"
state: "on"

- name: "गराज बल्ब"
id: "light.garage"
area: "garage_id"
state: "on"
Loading
Loading