Skip to content

Commit

Permalink
[DE] HassGetState floor support (#2708)
Browse files Browse the repository at this point in the history
* [DE] HassGetState floor support

* revert aliases for Geschoss
  • Loading branch information
andreasbrett authored Dec 6, 2024
1 parent 726f7ee commit 3ffe975
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 16 deletions.
1 change: 1 addition & 0 deletions sentences/de/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ expansion_rules:
name: "<artikel_bestimmt> {name}"
area: "[in|an|auf|bei][ (<artikel_bestimmt>|im|am|<von_dem>)] {area}[s]"
floor: "[in|auf][ (<artikel_bestimmt>|im|<von_dem>)] {floor}[ Geschoss]"
area_floor: "(<area>|<floor>)"
an: "(an|ein|auf)"
aus: "(aus|ab|zu)"
auf: "(auf|hoch|rauf|nach oben)"
Expand Down
32 changes: 16 additions & 16 deletions sentences/de/homeassistant_HassGetState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ intents:
HassGetState:
data:
- sentences:
- "(wie|was) ist[ [der ]Zustand <von_dem>] <name>[ <area>]"
- "(wie|was) ist[ [der ]Zustand <von_dem>] <name>[ <area_floor>]"
response: einzeln
excludes_context:
domain:
Expand All @@ -12,34 +12,34 @@ intents:
- script

- sentences:
- "ist <name> {on_off_states:state}[ <area>]"
- "ist <name>[ <area>] {on_off_states:state}"
- "ist[ <area>] <name> {on_off_states:state}"
- "ist <name> {on_off_states:state}[ <area_floor>]"
- "ist <name>[ <area_floor>] {on_off_states:state}"
- "ist[ <area_floor>] <name> {on_off_states:state}"
response: einzeln_janein
excludes_context:
domain:
- cover

- sentences:
- "sind[ <irgend>] {on_off_domains:domain} {on_off_states:state}[ <area>]"
- "sind[ <irgend>] {on_off_domains:domain}[ <area>] {on_off_states:state}"
- "sind[ <area>][ <irgend>] {on_off_domains:domain} {on_off_states:state}"
- "sind[ <irgend>] {on_off_domains:domain} {on_off_states:state}[ <area_floor>]"
- "sind[ <irgend>] {on_off_domains:domain}[ <area_floor>] {on_off_states:state}"
- "sind[ <area_floor>][ <irgend>] {on_off_domains:domain} {on_off_states:state}"
response: irgendeins

- sentences:
- "(sind|ist) <alle> {on_off_domains:domain} {on_off_states:state}[ <area>]"
- "(sind|ist) <alle> {on_off_domains:domain}[ <area>] {on_off_states:state}"
- "(sind|ist)[ <area>] <alle> {on_off_domains:domain} {on_off_states:state}"
- "(sind|ist) <alle> {on_off_domains:domain} {on_off_states:state}[ <area_floor>]"
- "(sind|ist) <alle> {on_off_domains:domain}[ <area_floor>] {on_off_states:state}"
- "(sind|ist)[ <area_floor>] <alle> {on_off_domains:domain} {on_off_states:state}"
response: alle

- sentences:
- "<welche> {on_off_domains:domain} (ist|sind) {on_off_states:state}[ <area>]"
- "<welche> {on_off_domains:domain} (ist|sind)[ <area>] {on_off_states:state}"
- "<welche> {on_off_domains:domain}[ <area>] (ist|sind) {on_off_states:state}"
- "<welche> {on_off_domains:domain} (ist|sind) {on_off_states:state}[ <area_floor>]"
- "<welche> {on_off_domains:domain} (ist|sind)[ <area_floor>] {on_off_states:state}"
- "<welche> {on_off_domains:domain}[ <area_floor>] (ist|sind) {on_off_states:state}"
response: welches

- sentences:
- "<wieviel> {on_off_domains:domain} (ist|sind) {on_off_states:state}[ <area>]"
- "<wieviel> {on_off_domains:domain} (ist|sind)[ <area>] {on_off_states:state}"
- "<wieviel> {on_off_domains:domain}[ <area>] (ist|sind) {on_off_states:state}"
- "<wieviel> {on_off_domains:domain} (ist|sind) {on_off_states:state}[ <area_floor>]"
- "<wieviel> {on_off_domains:domain} (ist|sind)[ <area_floor>] {on_off_states:state}"
- "<wieviel> {on_off_domains:domain}[ <area_floor>] (ist|sind) {on_off_states:state}"
response: wie_viele
69 changes: 69 additions & 0 deletions tests/de/homeassistant_HassGetState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ tests:
state: "off"
response: "Nein"

- sentences:
- "ist die Schlafzimmerlampe aus im Obergeschoss?"
- "ist die Schlafzimmerlampe im Obergeschoss aus?"
- "ist im Obergeschoss die Schlafzimmerlampe aus?"
intent:
name: HassGetState
slots:
floor: "Obergeschoss"
name: "Schlafzimmerlampe"
state: "off"
response: "Nein"

- sentences:
- "sind irgendwelche Schalter in der Küche an?"
- "sind irgendwelche Schalter an in der Küche?"
Expand All @@ -43,6 +55,18 @@ tests:
state: "on"
response: "Nein"

- sentences:
- "sind irgendwelche Schalter im Erdgeschoss an?"
- "sind irgendwelche Schalter an im Erdgeschoss?"
- "sind im Erdgeschoss irgendwelche Schalter angeschaltet?"
intent:
name: HassGetState
slots:
floor: "Erdgeschoss"
domain: "switch"
state: "on"
response: "Ja, Flurschalter"

- sentences:
- "sind alle Schalter aus?"
- "ist jeder Schalter aus?"
Expand All @@ -63,6 +87,16 @@ tests:
state: "off"
response: "Nein, Flurschalter ist es nicht"

- sentences:
- "sind alle Schalter im Erdgeschoss aus?"
intent:
name: HassGetState
slots:
floor: "Erdgeschoss"
domain: "switch"
state: "off"
response: "Nein, Flurschalter ist es nicht"

- sentences:
- "sind alle Lampen an?"
intent:
Expand All @@ -83,6 +117,30 @@ tests:
state: "on"
response: "Schlafzimmerlampe"

- sentences:
- "welche Lampen im Obergeschoss sind aus?"
- "welche Lampen im Obergeschoss sind ausgeschaltet?"
- "welche Lampe im Obergeschoss ist aus?"
intent:
name: HassGetState
slots:
floor: "Obergeschoss"
domain: "light"
state: "off"
response: "Schreibtischlampe"

- sentences:
- "welche Lampen im Schlafzimmer sind aus?"
- "welche Lampen im Schlafzimmer sind ausgeschaltet?"
- "welche Lampe im Schlafzimmer ist aus?"
intent:
name: HassGetState
slots:
area: "Schlafzimmer"
domain: "light"
state: "off"
response: "Schreibtischlampe"

- sentences:
- "wie viele Lampen sind an?"
intent:
Expand All @@ -102,3 +160,14 @@ tests:
domain: "light"
state: "on"
response: "1"

- sentences:
- "wie viele Lampen sind an im Obergeschoss?"
- "wie viele Lampen im Obergeschoss sind an?"
intent:
name: HassGetState
slots:
floor: "Obergeschoss"
domain: "light"
state: "on"
response: "1"

0 comments on commit 3ffe975

Please sign in to comment.