Debian Codegraph @

intents/responses/de/HassGetState.yaml

raw
1 language: de
2 responses:
3 intents:
4 HassGetState:
5 einzeln: |
6 {% if state.state|float(state.state) is number %}
7 {% set localized_rounded = state.state | float | round(1) | replace(".",",") | replace(",0","") %}
8 {{ slots.name | capitalize }} ist {{ state.state_with_unit | replace(state.state, localized_rounded) | replace("°C","Grad") | replace("°F","Grad") }}
9 {% else %}
10 {{ slots.name | capitalize }} ist {{ state.state_with_unit | replace(".", ",") | replace(",0","") }}
11 {% endif %}
12 einzeln_janein: |
13 {% if query.matched %}
14 Ja
15 {% else %}
16 Nein
17 {% endif %}
18
19 irgendeins: |
20 {% if query.matched %}
21 {% set match = query.matched | map(attribute="name") | sort | list %}
22 {% if match | length > 4 %}
23 Ja, {{ match[:3] | join(", ") }} und {{ (match | length - 3) }} weitere
24 {%- else -%}
25 Ja,
26 {% for name in match -%}
27 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} und {% endif -%}
28 {{ name }}
29 {%- endfor -%}
30 {% endif %}
31 {% else %}
32 Nein
33 {% endif %}
34
35 alle: |
36 {% if not query.unmatched: %}
37 Ja
38 {% else %}
39 {% set no_match = query.unmatched | map(attribute="name") | sort | list %}
40 {% if no_match | length > 4 %}
41 Nein, {{ no_match[:3] | join(", ") }} und {{ (no_match | length - 3) }} weitere sind es nicht
42 {%- else -%}
43 Nein,
44 {% for name in no_match -%}
45 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} und {% endif -%}
46 {{ name }}
47 {%- endfor %} {% if no_match | length == 1 %}ist{% else %}sind{% endif %} es nicht
48 {% endif %}
49 {% endif %}
50
51 welches: |
52 {% if not query.matched %}
53 Keins
54 {% else: %}
55 {% set match = query.matched | map(attribute="name") | sort | list %}
56 {% if match | length > 4 %}
57 {{ match[:3] | join(", ") }} und {{ (match | length - 3) }} weitere
58 {% else %}
59 {%- for name in match -%}
60 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} und {% endif -%}
61 {{ name }}
62 {%- endfor -%}
63 {% endif %}
64 {% endif %}
65
66 wie_viele: |
67 {{ query.matched | length }}
68
69 wo: |
70 {% if state.state == "home" %}
71 {{ slots.name | capitalize }} ist zu Hause
72 {% elif state.state == "not_home" %}
73 {{ slots.name | capitalize }} ist unterwegs
74 {% else %}
75 {{ slots.name | capitalize }} ist im Bereich {{ state.state }}
76 {% endif %}
77
78 wer: |
79 {% if not query.matched %}
80 Niemand
81 {% else: %}
82 {% set match = query.matched | map(attribute="name") | sort | list %}
83 {% if match | length > 4 %}
84 {{ match[:3] | join(", ") }} und {{ (match | length - 3) }} weitere
85 {% else %}
86 {%- for name in match -%}
87 {% if not loop.first and not loop.last %}, {% elif loop.last and not loop.first %} und {% endif -%}
88 {{ name }}
89 {%- endfor -%}
90 {% endif %}
91 {% endif %}
92
93 get_media_name: |
94 {% set title = state.attributes.media_title | default(None) %}
95 {% set artist = state.attributes.media_artist | default(None) %}
96 {% set result = (title and artist) and (title ~ " von " ~ artist) or (title or artist) or None %}
97 {% if state.state in ["off", "idle"] %}
98 {{ slots.name | capitalize }} spielt derzeit nichts ab
99 {% elif not result %}
100 Keine Informationen verfügbar
101 {% elif state.state == "paused" %}
102 {{ result }} ist derzeit pausiert
103 {% elif state.state == "buffering" %}
104 {{ result }} lädt derzeit
105 {% else %}
106 {{ result }}
107 {% endif %}
108
109 get_volume: |
110 {% if 'volume_level' in state.attributes %}
111 {% set volume = (state.attributes.volume_level | float(0)) * 100 %}
112 {{ slots.name | capitalize }} ist auf {{ volume | round(0) | int }} % eingestellt
113 {% elif state.state == "off" %}
114 {{ slots.name | capitalize }} ist im Moment ausgeschaltet
115 {% else %}
116 {{ slots.name | capitalize }} hat keinen Lautstärke-Wert
117 {% endif %}
118
119 get_brightness: |
120 {% if state.state == "off" %}
121 {{ slots.name | capitalize }} ist im Moment ausgeschaltet
122 {% elif 'brightness' in state.attributes and state.attributes.brightness is not none %}
123 {% set brightness = (state.attributes.brightness | float(0)) / 255 * 100 %}
124 {{ slots.name | capitalize }} ist auf {{ brightness | round(0) | int }} % eingestellt
125 {% else %}
126 {{ slots.name | capitalize }} hat keinen Dimmer-Wert
127 {% endif %}
128
129 get_color_temperature: |
130 {% if state.state == "off" %}
131 {{ slots.name | capitalize }} ist im Moment ausgeschaltet
132 {% elif 'color_temp_kelvin' in state.attributes and state.attributes.color_temp_kelvin is not none %}
133 {% set col_temp = (state.attributes.color_temp_kelvin | float(0)) %}
134 {{ slots.name | capitalize }} ist auf {{ col_temp | round(0) | int }} Kelvin eingestellt
135 {% else %}
136 {{ slots.name | capitalize }} hat keinen Farbtemperatur-Wert
137 {% endif %}