Skip to content

Commit bc7f4b5

Browse files
committed
added cover get state
1 parent 2c460db commit bc7f4b5

File tree

5 files changed

+59
-74
lines changed

5 files changed

+59
-74
lines changed

responses/ne/HassGetState.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ responses:
1313
{% if query.matched %}
1414
1515
{% else %}
16-
छैन, {{ state.state_with_unit }} छ
16+
छैन
1717
{% endif %}
1818
1919
any: |
2020
{% if query.matched %}
2121
{% set match = query.matched | map(attribute="name") | sort | list %}
2222
{% if match | length > 4 %}
23-
छ, {{ match[:3] | join(", ") }} र अरु {{ (match | length - 3) }} ओटा {{ slots.state }} छन्
23+
छ, {{ match[:3] | join(", ") }} र अरु {{ (match | length - 3) }} ओटा
2424
{%- else -%}
2525
छ,
2626
{% for name in match -%}
27-
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} र % endif -%}
27+
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} र {% endif -%}
2828
{{ name }}
2929
{%- endfor -%}
3030
{% endif %}
@@ -33,25 +33,25 @@ responses:
3333
{% endif %}
3434
3535
all: |
36-
{% if not query.unmatched: %}
36+
{% if not query.unmatched %}
3737
3838
{% else %}
3939
{% set no_match = query.unmatched | map(attribute="name") | sort | list %}
4040
{% if no_match | length > 4 %}
41-
छैन, {{ no_match[:3] | join(", ") }} र अरु {{ (no_match | length - 3) }} {{ slots.state }} छैन्न
41+
छैन, {{ no_match[:3] | join(", ") }} र अरु {{ (no_match | length - 3) }} ओटा
4242
{%- else -%}
43-
No,
43+
छैन,
4444
{% for name in no_match -%}
4545
{% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} र {% endif -%}
4646
{{ name }}
47-
{%- endfor %} {{ slots.state }} {% if no_match | length > 1 %}छैन्न{% else %}छैन{% endif %}
47+
{%- endfor %}
4848
{% endif %}
4949
{% endif %}
5050
5151
which: |
5252
{% if not query.matched %}
5353
कुनै पनि छैन
54-
{% else: %}
54+
{% else %}
5555
{% set match = query.matched | map(attribute="name") | sort | list %}
5656
{% if match | length > 4 %}
5757
{{ match[:3] | join(", ") }} र अरु {{ (match | length - 3) }} ओटा

sentences/ne/cover_HassGetState.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ intents:
1010
slots:
1111
domain: cover
1212

13-
- sentences:
14-
- "[<area_floor_in>] <name>को <अवस्था> के छ"
15-
response: one
16-
requires_context:
17-
domain: cover
18-
slots:
19-
domain: cover
13+
# - sentences:
14+
# - "[<area_floor_in>] <name>को <अवस्था> के छ"
15+
# response: one
16+
# requires_context:
17+
# domain: cover
18+
# slots:
19+
# domain: cover
2020

2121
- sentences:
2222
- "के [<area_floor_in>] कुनै {cover_classes:device_class} {cover_states:state} (छ|छन्|छन)"
@@ -32,13 +32,13 @@ intents:
3232
domain: cover
3333

3434
- sentences:
35-
- "कुन [<area_floor_in>] {cover_classes:device_class} {cover_states:state} (छ|छन्|छन)"
35+
- "[<area_floor_in>] कुन {cover_classes:device_class} {cover_states:state} (छ|छन्|छन)"
3636
response: which
3737
slots:
3838
domain: cover
3939

4040
- sentences:
41-
- "कति ओटा [<area_floor_in>] {cover_classes:device_class} {cover_states:state} (छ|छन्|छन)"
41+
- "[<area_floor_in>] कति ओटा {cover_classes:device_class} {cover_states:state} (छ|छन्|छन)"
4242
response: how_many
4343
slots:
4444
domain: cover

tests/ne/_fixtures.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ entities:
9090
attributes:
9191
device_class: curtain
9292

93-
- name: "देब्रे छायां"
93+
- name: "देब्रे छायाँ"
9494
id: "cover.shade_left"
9595
area: "guest_room_id"
9696
state: "open"

tests/ne/cover_HassGetState.yaml

Lines changed: 38 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,115 @@
11
language: ne
22
tests:
33
- sentences:
4-
- "is curtain left closed?"
5-
- "is the curtain left closed?"
6-
- "is the curtain left shut?"
4+
- "के देब्रे पर्दा लागेको छ"
5+
- "के देब्रे पर्दा बन्द छ"
76
intent:
87
name: HassGetState
98
slots:
109
domain: cover
11-
name: "Curtain Left"
10+
name: "देब्रे पर्दा"
1211
state: "closed"
13-
response: "No, open"
12+
response: "छैन"
1413

1514
- sentences:
16-
- "what is the state of curtain left?"
15+
- "के बैठकमा कुनै परदा खुल्ला छन्"
1716
intent:
1817
name: HassGetState
1918
slots:
2019
domain: cover
21-
name: "Curtain Left"
22-
response: "Curtain left is open"
23-
24-
- sentences:
25-
- "are any curtains open in the living room?"
26-
- "are any living room curtains open?"
27-
- "are any of the living room curtains open?"
28-
- "are there any curtains open in the living room?"
29-
- "are there any living room curtains open?"
30-
- "any living room curtains open?"
31-
intent:
32-
name: HassGetState
33-
slots:
34-
domain: cover
35-
area: "Living Room"
20+
area: "बैठक"
3621
device_class: curtain
3722
state: "open"
38-
response: "Yes, Curtain Left"
39-
23+
response: "छ, देब्रे पर्दा"
24+
# - sentences:
25+
# - "देब्रे पर्दाको अवस्था के छ"
26+
# intent:
27+
# name: HassGetState
28+
# slots:
29+
# domain: cover
30+
# name: "देब्रे पर्दा"
31+
# response: "देब्रे पर्दा खुल्ला छ"
4032
- sentences:
41-
- "are any shades open upstairs?"
42-
- "are any of the shades open upstairs?"
43-
- "any shades open upstairs?"
33+
- "के पहिलो तल्लामा कुनै छायाँहरु खुल्ला छन्"
4434
intent:
4535
name: HassGetState
4636
slots:
4737
domain: cover
48-
floor: "Upstairs"
38+
floor: "पहिलो तल्ला"
4939
device_class: shade
5040
state: "open"
51-
response: "Yes, Shade Left"
41+
response: "छैन"
5242

5343
- sentences:
54-
- "are any shades open outside?"
44+
- "के भान्छामा कुनै शटरहरु खुल्ला छन्"
5545
intent:
5646
name: HassGetState
5747
slots:
5848
domain: cover
59-
area: "Outside"
60-
device_class: shade
49+
area: "भान्छा"
50+
device_class: shutter
6151
state: "open"
62-
response: "No"
52+
response: "छैन"
6353

6454
- sentences:
65-
- "are all curtains open in the living room?"
66-
- "are all living room curtains open?"
55+
- "के बैठकको सबै परदा खुल्ला छन्"
6756
intent:
6857
name: HassGetState
6958
slots:
7059
domain: cover
71-
area: "Living Room"
60+
area: "बैठक"
7261
device_class: curtain
7362
state: "open"
74-
response: "No, Curtain Right is not open"
75-
63+
response: "छैन, दाइने पर्दा"
7664
- sentences:
77-
- "are all curtains open on the first floor?"
65+
- "के पहिलो तल्लामा सबै परदा खुल्ला छन्"
7866
intent:
7967
name: HassGetState
8068
slots:
8169
domain: cover
82-
floor: "First Floor"
70+
floor: "पहिलो तल्ला"
8371
device_class: curtain
8472
state: "open"
85-
response: "No, Curtain Right is not open"
73+
response: "छैन, दाइने पर्दा"
8674

8775
- sentences:
88-
- "which curtains are closed?"
89-
- "which of the curtains are closed?"
76+
- "कुन परदाहरु बन्द छन्"
9077
intent:
9178
name: HassGetState
9279
slots:
9380
domain: cover
9481
device_class: curtain
9582
state: "closed"
96-
response: "Bedroom Curtain and Curtain Right"
83+
response: "दाइने पर्दा र सुत्ने कोठाको पर्दा"
9784

9885
- sentences:
99-
- "which bedroom curtains are closed?"
100-
- "which of the bedroom curtains are closed?"
86+
- "बैठकको कुन परदाहरु बन्द छन्"
10187
intent:
10288
name: HassGetState
10389
slots:
10490
domain: cover
105-
area: "Bedroom"
91+
area: "बैठक"
10692
device_class: curtain
10793
state: "closed"
108-
response: "Bedroom Curtain"
94+
response: "दाइने पर्दा"
10995

11096
- sentences:
111-
- "how many curtains are closed?"
97+
- "कति ओटा परदाहरु बन्द छन्"
11298
intent:
11399
name: HassGetState
114100
slots:
115101
domain: cover
116102
device_class: curtain
117103
state: "closed"
118-
response: "2"
104+
response: "2 ओटा"
119105

120106
- sentences:
121-
- "how many bedroom curtains are closed?"
122-
- "how many of the bedroom curtains are closed?"
107+
- "सुत्ने कोठाको कति ओटा परदाहरु बन्द छन्"
123108
intent:
124109
name: HassGetState
125110
slots:
126111
domain: cover
127112
device_class: curtain
128-
area: "Bedroom"
113+
area: "सुत्ने कोठा"
129114
state: "closed"
130-
response: "1"
115+
response: "1 ओटा"

tests/ne/cover_HassSetPosition.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ tests:
1818
- sentences:
1919
- "बैठकको पर्दालाई 50% खोल्नु"
2020
- "बैठकको पर्दा 50 प्रतिशत बनाउनु"
21-
- "बैठकको पर्दा‌ 50 प्रतिशत बन्द गर्नु"
21+
- "बैठकको पर्दा 50 % लगाउनु"
22+
- "बैठकको पर्दा 50 प्रतिशत बन्द गर्नु"
2223
- "बैठकको पर्दालाई 50 प्रतिशत खुल्ला बनाउनु"
2324
- "बैठकको पर्दालाई 50 प्रतिशत लगाउनु"
2425
- "बैठकको पर्दालाई 50 प्रतिशत बनाउनु"
2526
- "बैठकको पर्दाहरुलाई 50 प्रतिशत खोल्नु"
2627
- "बैठकको पर्दाहरु 50 प्रतिशत बनाउनु"
27-
- "बैठकको पर्दा‌हरु 50 प्रतिशत बन्द गर्नु"
2828
- "बैठकको पर्दाहरुलाई 50 प्रतिशत खुल्ला बनाउनु"
29-
- "बैठकको पर्दा‌हरुलाई 50 प्रतिशत लगाउनु"
29+
- "बैठकको पर्दा 50 प्रतिशत लगाउनु"
3030
- "बैठकको पर्दाहरुलाई 50 प्रतिशत बनाउनु"
3131

3232
intent:

0 commit comments

Comments
 (0)