Skip to content

Commit

Permalink
Add timer and state/feature errors (#2182)
Browse files Browse the repository at this point in the history
* Add timer and state/feature errors

* Add to validation

* Use state name

* Add no timer support message

* Add to validate
  • Loading branch information
synesthesiam authored May 28, 2024
1 parent 1a97bc3 commit c40f124
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions script/intentfest/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ def validate(value):
"duplicate_entities",
"duplicate_entities_in_area",
"duplicate_entities_in_floor",
"entity_wrong_state",
"feature_not_supported",
"timer_not_found",
"multiple_timers_matched",
"no_timer_support",
}

SENTENCE_MATCHER = vol.All(
Expand Down
7 changes: 7 additions & 0 deletions sentences/en/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ responses:
no_entity: "Sorry, I am not aware of any device called {{ entity }}"
no_entity_in_area: "Sorry, I am not aware of any device called {{ entity }} in the {{ area }} area"
no_entity_in_floor: "Sorry, I am not aware of any device called {{ entity }} in the {{ floor }} floor"
entity_wrong_state: "Sorry, no device is {{ state | lower }}"
feature_not_supported: "Sorry, no device supports the required features"

# Errors for when user is logged in and we can give more information
no_entity_exposed: "Sorry, {{ entity }} is not exposed"
Expand All @@ -33,6 +35,11 @@ responses:
duplicate_entities: "Sorry, there are multiple devices called {{ entity }}"
duplicate_entities_in_area: "Sorry, there are multiple devices called {{ entity }} in the {{ area }} area"
duplicate_entities_in_floor: "Sorry, there are multiple devices called {{ entity }} in the {{ floor }} floor"

# Errors for timers
timer_not_found: "Sorry, I couldn't find that timer"
multiple_timers_matched: "Sorry, I am unable to target multiple timers"
no_timer_support: "Sorry, timers are not supported on this device"
lists:
color:
values:
Expand Down

0 comments on commit c40f124

Please sign in to comment.