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

[PT] Improve cover intent #2101

Merged
merged 3 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions sentences/pt/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ lists:
out: switch
cover_states:
values:
- in: "(aberto|aberta|abertas)"
- in: "(aberto|aberta|abertos|abertas)"
out: "open"
- in: "(fechado|fechada|fechadas)"
- in: "(fechado|fechada|fechados|fechadas)"
out: "closed"
- in: "a abrir"
out: "opening"
Expand All @@ -103,7 +103,7 @@ lists:
out: gate
- in: (toldo[s]|tolde[s])
out: shade
- in: persiana[s]
- in: (persiana[s]|estore[s])
out: shutter
- in: janela[s]
out: window
Expand Down
2 changes: 1 addition & 1 deletion sentences/pt/cover_HassGetState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ intents:
domain: cover

- sentences:
- "quantas {cover_classes:device_class} estão {cover_states:state} [<na_zona>]"
- "(quantas|quantos) {cover_classes:device_class} estão {cover_states:state} [<na_zona>]"
response: how_many
slots:
domain: cover
7 changes: 7 additions & 0 deletions tests/pt/_fixtures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ entities:
attributes:
device_class: curtain

- name: "Estores da Sala de Estar"
id: "shutter.sala"
area: "sala_de_estar"
state: "open"
attributes:
device_class: shutter

- name: "Cortina Quarto"
id: "cover.quarto_cortina"
area: "quarto"
Expand Down
10 changes: 10 additions & 0 deletions tests/pt/cover_HassGetState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@ tests:
device_class: curtain
state: "closed"
response: "2"

# - sentences:
# - "Quantos estores estão abertos?"
# intent:
# name: HassGetState
# slots:
# domain: cover
# device_class: shutter
# state: "open"
# response: "1"