Commit f57b549
Improve custom widget state handling and URL management (#4262)
Refactored custom widget to use AppConstants.createCustomWidgetURL for
deeplink construction. Enhanced domain state handling by introducing
isActive property and ensuring state comparison is case-insensitive.
Updated icon color logic to support additional domains (cover, fan) and
improved clarity in state checks.
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->
## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->
## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
<img width="1342" height="952" alt="CleanShot 2026-01-28 at 10 44 39@2x"
src="https://github.com/user-attachments/assets/0d92a047-2356-45b5-8208-423d0b669e4b"
/>
## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#
## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>1 parent efe9855 commit f57b549
File tree
8 files changed
+161
-64
lines changed- HomeAssistant.xcodeproj
- Sources
- App/WebView/ExperimentalSpace/Home
- Extensions/Widgets/Custom
8 files changed
+161
-64
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
676 | | - | |
677 | 676 | | |
678 | 677 | | |
679 | 678 | | |
| |||
847 | 846 | | |
848 | 847 | | |
849 | 848 | | |
| 849 | + | |
| 850 | + | |
850 | 851 | | |
851 | 852 | | |
852 | 853 | | |
| |||
882 | 883 | | |
883 | 884 | | |
884 | 885 | | |
885 | | - | |
886 | 886 | | |
887 | 887 | | |
888 | 888 | | |
| |||
2547 | 2547 | | |
2548 | 2548 | | |
2549 | 2549 | | |
2550 | | - | |
2551 | 2550 | | |
2552 | 2551 | | |
2553 | 2552 | | |
| |||
5824 | 5823 | | |
5825 | 5824 | | |
5826 | 5825 | | |
5827 | | - | |
5828 | 5826 | | |
5829 | 5827 | | |
5830 | 5828 | | |
| |||
5838 | 5836 | | |
5839 | 5837 | | |
5840 | 5838 | | |
5841 | | - | |
5842 | 5839 | | |
5843 | 5840 | | |
5844 | 5841 | | |
| |||
7076 | 7073 | | |
7077 | 7074 | | |
7078 | 7075 | | |
| 7076 | + | |
7079 | 7077 | | |
7080 | 7078 | | |
7081 | 7079 | | |
| |||
9433 | 9431 | | |
9434 | 9432 | | |
9435 | 9433 | | |
9436 | | - | |
9437 | 9434 | | |
9438 | 9435 | | |
9439 | 9436 | | |
| |||
9479 | 9476 | | |
9480 | 9477 | | |
9481 | 9478 | | |
9482 | | - | |
9483 | 9479 | | |
9484 | 9480 | | |
9485 | 9481 | | |
| |||
9701 | 9697 | | |
9702 | 9698 | | |
9703 | 9699 | | |
| 9700 | + | |
9704 | 9701 | | |
9705 | 9702 | | |
9706 | 9703 | | |
| |||
9986 | 9983 | | |
9987 | 9984 | | |
9988 | 9985 | | |
| 9986 | + | |
9989 | 9987 | | |
9990 | 9988 | | |
9991 | 9989 | | |
| |||
Lines changed: 0 additions & 20 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
91 | | - | |
92 | | - | |
93 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
94 | 93 | | |
95 | | - | |
| 94 | + | |
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
| |||
157 | 164 | | |
158 | 165 | | |
159 | 166 | | |
160 | | - | |
| 167 | + | |
| 168 | + | |
161 | 169 | | |
162 | 170 | | |
163 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | | - | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
137 | 134 | | |
138 | 135 | | |
139 | 136 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
| 137 | + | |
145 | 138 | | |
146 | 139 | | |
147 | 140 | | |
148 | 141 | | |
149 | | - | |
| 142 | + | |
150 | 143 | | |
151 | 144 | | |
152 | 145 | | |
153 | 146 | | |
154 | 147 | | |
155 | | - | |
156 | 148 | | |
157 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
158 | 213 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
166 | 225 | | |
167 | 226 | | |
168 | 227 | | |
169 | | - | |
| 228 | + | |
| 229 | + | |
170 | 230 | | |
171 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
172 | 237 | | |
173 | 238 | | |
174 | 239 | | |
175 | | - | |
| 240 | + | |
| 241 | + | |
176 | 242 | | |
177 | 243 | | |
178 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
179 | 266 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
| |||
0 commit comments