| 1 | language: nb |
| 2 | responses: |
| 3 | intents: |
| 4 | HassGetState: |
| 5 | one: | |
| 6 | {{ slots.name }} er {{ state.state_with_unit }} |
| 7 | one_yesno: | |
| 8 | {% if query.matched %} |
| 9 | Ja |
| 10 | {% else: %} |
| 11 | Nei, {{ state.state_with_unit }} |
| 12 | {% endif %} |
| 13 | any: | |
| 14 | {% if query.matched %} |
| 15 | {% set match = query.matched | map(attribute="name") | sort | list %} |
| 16 | {% if match | length > 4 %} |
| 17 | Ja, {{ match[:3] | join(", ") }} og {{ (match | length - 3) }} til |
| 18 | {%- else -%} |
| 19 | Ja, |
| 20 | {% for name in match -%} |
| 21 | {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} og {% endif -%} |
| 22 | {{ name }} |
| 23 | {%- endfor -%} |
| 24 | {% endif %} |
| 25 | {% else: %} |
| 26 | Nei |
| 27 | {% endif %} |
| 28 | all: | |
| 29 | {% if not query.unmatched %} |
| 30 | Ja |
| 31 | {% else: %} |
| 32 | {% set no_match = query.unmatched | map(attribute="name") | sort | list %} |
| 33 | {% if no_match | length > 4 %} |
| 34 | Nei, ikke {{ no_match[:3] | join(", ") }} og {{ (no_match | length - 3) }} til |
| 35 | {%- else -%} |
| 36 | Nei, ikke |
| 37 | {% for name in no_match -%} |
| 38 | {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} og {% endif -%} |
| 39 | {{ name }} |
| 40 | {%- endfor %} |
| 41 | {% endif %} |
| 42 | {% endif %} |
| 43 | which: | |
| 44 | {% if not query.matched %} |
| 45 | Ingen |
| 46 | {% else: %} |
| 47 | {% set match = query.matched | map(attribute="name") | sort | list %} |
| 48 | {% if match | length > 4 %} |
| 49 | {{ match[:3] | join(", ") }} og {{ (match | length - 3) }} til |
| 50 | {% else %} |
| 51 | {%- for name in match -%} |
| 52 | {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} og {% endif -%} |
| 53 | {{ name }} |
| 54 | {%- endfor -%} |
| 55 | {% endif %} |
| 56 | {% endif %} |
| 57 | how_many: | |
| 58 | {% if not query.matched: %} |
| 59 | 0 |
| 60 | {% else: %} |
| 61 | {{ query.matched | length }} |
| 62 | {% endif %} |