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

[DE] Add binary sensor light #1931

Merged
merged 4 commits into from
Feb 16, 2024
Merged
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
15 changes: 12 additions & 3 deletions sentences/de/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ lists:
out: "off"
bs_carbon_monoxide_states:
values:
- in: "(entdeckt|ausgelöst|erkannt|an)"
- in: "<erkannt>"
out: "on"
- in: "(klar|rein|sauber|sicher)"
out: "off"
Expand Down Expand Up @@ -167,7 +167,7 @@ lists:
out: "off"
bs_gas_states:
values:
- in: "(entdeckt|ausgelöst|erkannt|an)"
- in: "<erkannt>"
out: "on"
- in: "(klar|rein|sauber|sicher)"
out: "off"
Expand All @@ -177,9 +177,15 @@ lists:
out: "on"
- in: "normal"
out: "off"
bs_light_states:
values:
- in: "<erkannt>"
out: "on"
- in: "kein Licht"
out: "off"
bs_problem_states:
values:
- in: "erkannt"
- in: "<erkannt>"
out: "on"
- in: "(ok[ay]|normal)"
out: "off"
Expand Down Expand Up @@ -244,6 +250,9 @@ expansion_rules:
co_sensor: "<co>[-]Sensor[en]"
gas_sensor: "Gas[-]Sensor[en]"
ding: "((Ding|Gerät)[e|en]|Sensor[en]|Gegenstand|Gegenstände[n])"
erkannt: "(entdeckt|ausgelöst|erkannt|an)"
ist_wurde: "(ist|wurde)"
sind_wurden: "(sind|wurden)"
skip_words:
- "bitte"
- "danke"
Expand Down
50 changes: 50 additions & 0 deletions sentences/de/binary_sensor_HassGetState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,56 @@ intents:
device_class: heat
state: "on"

# Light
- sentences:
- "<ist_wurde> <name> [<area>] {bs_light_states:state}"
- "<ist_wurde> <name> {bs_light_states:state} <area>"
- "<ist_wurde> <area> <name> {bs_light_states:state}"
response: einzeln_janein
requires_context:
domain: binary_sensor
device_class: light
slots:
domain: binary_sensor
device_class: light

- sentences:
- "(<ist_wurde>|<sind_wurden>) [<irgend>] Licht[er] [<area>] {bs_light_states:state}"
- "(<ist_wurde>|<sind_wurden>) [<irgend>] Licht[er] {bs_light_states:state} <area>"
- "(<ist_wurde>|<sind_wurden>) <area> [<irgend>] Licht[er] {bs_light_states:state}"
- "(<ist_wurde>|<sind_wurden>) [<irgend>] <area> Licht[er] {bs_light_states:state}"
response: irgendeins
slots:
domain: binary_sensor
device_class: light

- sentences:
- "<sind_wurden> <alle> Licht[er] [<area>] {bs_light_states:state}"
- "<sind_wurden> <alle> Licht[er] {bs_light_states:state} <area>"
- "<sind_wurden> <area> <alle> Licht[er] {bs_light_states:state}"
response: alle
slots:
domain: binary_sensor
device_class: light

- sentences:
- "<welche> Licht[er] (<ist_wurde>|<sind_wurden>) [<area>] {bs_light_states:state}"
- "<welche> Licht[er] (<ist_wurde>|<sind_wurden>) {bs_light_states:state} <area>"
- "<welche> Licht[er] <area> (<ist_wurde>|<sind_wurden>) {bs_light_states:state}"
response: welches
slots:
domain: binary_sensor
device_class: light

- sentences:
- "<wieviel> Licht[er] (<ist_wurde>|<sind_wurden>) [<area>] {bs_light_states:state}"
- "<wieviel> Licht[er] (<ist_wurde>|<sind_wurden>) {bs_light_states:state} <area>"
- "<wieviel> Licht[er] <area> (<ist_wurde>|<sind_wurden>) {bs_light_states:state}"
response: wie_viele
slots:
domain: binary_sensor
device_class: light

# Problem
- sentences:
- "Gibt es [<irgend>] Problem[e] mit <name> [<area>]"
Expand Down
9 changes: 9 additions & 0 deletions tests/de/_fixtures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,15 @@ entities:
attributes:
device_class: heat

- name: "Licht"
id: "binary_sensor.light"
area: office
state:
in: "kein Licht"
out: "off"
attributes:
device_class: light

- name: "Futterspender"
id: "binary_sensor.problem"
area: kitchen
Expand Down
81 changes: 81 additions & 0 deletions tests/de/binary_sensor_HassGetState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,87 @@ tests:
state: "on"
response: "1"

# Light
- sentences:
- "wurde Licht erkannt?"
- "ist Licht ausgelöst?"
- "ist Licht an?"
intent:
name: HassGetState
slots:
domain: "binary_sensor"
device_class: "light"
name: "Licht"
state: "on"
response: "Nein"

- sentences:
- "wurde Licht im Büro erkannt?"
- "ist im Büro Licht ausgelöst?"
- "ist Licht an im Büro?"
intent:
name: HassGetState
slots:
area: "Büro"
domain: "binary_sensor"
device_class: "light"
name: "Licht"
state: "on"
response: "Nein"

- sentences:
- "wurde irgendwelches Licht im Büro erkannt?"
- "wurde im Büro irgendwelches Licht erkannt?"
- "ist irgendwo im Büro Licht ausgelöst?"
- "sind irgendwo Lichter an im Büro?"
intent:
name: HassGetState
slots:
area: "Büro"
domain: binary_sensor
device_class: light
state: "on"
response: "Nein"

- sentences:
- "sind im Büro alle Lichter erkannt?"
- "wurden alle Lichter im Büro erkannt?"
- "wurden alle Lichter erkannt im Büro?"
intent:
name: HassGetState
slots:
area: "Büro"
domain: binary_sensor
device_class: light
state: "on"
response: "Nein, Licht ist es nicht"

- sentences:
- "welche Lichter wurden im Büro erkannt?"
- "welches Licht im Büro ist an?"
- "welches Licht ist an im Büro?"
intent:
name: HassGetState
slots:
area: "Büro"
domain: binary_sensor
device_class: light
state: "on"
response: "Keins"

- sentences:
- "wieviele Lichter wurden im Büro erkannt?"
- "wie viel Licht im Büro ist an?"
- "wieviele Lichter wurden erkannt im Büro?"
intent:
name: HassGetState
slots:
area: "Büro"
domain: binary_sensor
device_class: light
state: "on"
response: "0"

# Problem
- sentences:
- "Gibt es Probleme mit dem Futterspender"
Expand Down