mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-24 00:29:26 +00:00
Compare commits
699 Commits
dashboard_
...
remove-unc
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f4bfcc6a69 | ||
![]() |
50cf6d2af9 | ||
![]() |
86626b1855 | ||
![]() |
63603a281e | ||
![]() |
faf05f5339 | ||
![]() |
4de3db52cb | ||
![]() |
9a9fbda08b | ||
![]() |
ea642515c1 | ||
![]() |
add2dedc7f | ||
![]() |
4ba4a28aa0 | ||
![]() |
7050453783 | ||
![]() |
8f984517bb | ||
![]() |
2524c96db6 | ||
![]() |
26600e3d78 | ||
![]() |
316756d06a | ||
![]() |
7357b914d0 | ||
![]() |
8548c9767b | ||
![]() |
a30a35f82f | ||
![]() |
84938ccc94 | ||
![]() |
8136cc8008 | ||
![]() |
2dc9d268ec | ||
![]() |
226dad309c | ||
![]() |
33cdd51f00 | ||
![]() |
a3a099126e | ||
![]() |
4e22fea6e2 | ||
![]() |
fd06f28253 | ||
![]() |
553230ca23 | ||
![]() |
208bfebc12 | ||
![]() |
802b0949ac | ||
![]() |
b65dc47f72 | ||
![]() |
c5a3670838 | ||
![]() |
cd167ac645 | ||
![]() |
eb3e756637 | ||
![]() |
5049210524 | ||
![]() |
eeaad86c4b | ||
![]() |
71483e0bc7 | ||
![]() |
10650e8937 | ||
![]() |
99d72ba817 | ||
![]() |
e21ad742b1 | ||
![]() |
1bcb1e7768 | ||
![]() |
618fee98ce | ||
![]() |
83da89437f | ||
![]() |
fac82fa185 | ||
![]() |
17bd7f9476 | ||
![]() |
045ff7a45e | ||
![]() |
8624853ec4 | ||
![]() |
336376d2a5 | ||
![]() |
189793bff4 | ||
![]() |
1e35f973d6 | ||
![]() |
6033f8b31a | ||
![]() |
c3b2ebf380 | ||
![]() |
23cbecb2c4 | ||
![]() |
b1e1b44c75 | ||
![]() |
abb014745a | ||
![]() |
e51c98e1a7 | ||
![]() |
9513699332 | ||
![]() |
b57bc8cd06 | ||
![]() |
d61fc9ec6c | ||
![]() |
d1592bf262 | ||
![]() |
3c744c09f1 | ||
![]() |
3ef61aaf02 | ||
![]() |
c738127c09 | ||
![]() |
6e62f568fc | ||
![]() |
2ba3a991a9 | ||
![]() |
55c6d3a7c4 | ||
![]() |
242f3813bc | ||
![]() |
aa93cb17a7 | ||
![]() |
4692d885d1 | ||
![]() |
b39ac984f9 | ||
![]() |
9894d83e22 | ||
![]() |
113083a241 | ||
![]() |
32971cc875 | ||
![]() |
137f59feb1 | ||
![]() |
6675121b85 | ||
![]() |
aed0a35c9c | ||
![]() |
65a8518d99 | ||
![]() |
cb690e9d4e | ||
![]() |
5da67de95f | ||
![]() |
b9609f2154 | ||
![]() |
aaabb6e1fb | ||
![]() |
6561de34f0 | ||
![]() |
016ff74483 | ||
![]() |
f5e9839b42 | ||
![]() |
eb3b168975 | ||
![]() |
aa400ce6ab | ||
![]() |
682f9a0f04 | ||
![]() |
e478038206 | ||
![]() |
259a9a4f58 | ||
![]() |
b08d1ae7e9 | ||
![]() |
3970fdd070 | ||
![]() |
946445b2df | ||
![]() |
17b090af58 | ||
![]() |
6690a0e4b1 | ||
![]() |
c291448ffa | ||
![]() |
6f831699be | ||
![]() |
fb73bfb964 | ||
![]() |
28a0d216f9 | ||
![]() |
69f2566526 | ||
![]() |
7b3797502a | ||
![]() |
cf960be07e | ||
![]() |
8a410d6c82 | ||
![]() |
b6bc88e460 | ||
![]() |
6e00806f1a | ||
![]() |
d9fa148c49 | ||
![]() |
939b3a8092 | ||
![]() |
95920ba710 | ||
![]() |
462ac79890 | ||
![]() |
601a165b2a | ||
![]() |
62bb9b1a87 | ||
![]() |
b60ba35a9f | ||
![]() |
c97c3f2fc4 | ||
![]() |
ed888200f9 | ||
![]() |
f4859320eb | ||
![]() |
b159f4c074 | ||
![]() |
b700e08d52 | ||
![]() |
c1bdd679ff | ||
![]() |
b728b9efc4 | ||
![]() |
8acae63939 | ||
![]() |
374f5ee1be | ||
![]() |
528533a2dd | ||
![]() |
2b18db8525 | ||
![]() |
6cd8ee9253 | ||
![]() |
e45709fffc | ||
![]() |
28c21b1041 | ||
![]() |
0919f0e89e | ||
![]() |
64fc58ddd2 | ||
![]() |
568e9ebc38 | ||
![]() |
33888beb63 | ||
![]() |
0bc6f9152a | ||
![]() |
17fd0de102 | ||
![]() |
f98e66a409 | ||
![]() |
314499005d | ||
![]() |
6dcc70f6fc | ||
![]() |
5e40bb55eb | ||
![]() |
476457fe2e | ||
![]() |
4c314928c6 | ||
![]() |
73460c7d8a | ||
![]() |
767b2b6b9c | ||
![]() |
0944b1e9d3 | ||
![]() |
623ac88166 | ||
![]() |
3a204d889f | ||
![]() |
107f0da88b | ||
![]() |
86bbff36ea | ||
![]() |
42a52f9a1c | ||
![]() |
ade8687d7b | ||
![]() |
e1341a1961 | ||
![]() |
74282e9afe | ||
![]() |
687c9753a0 | ||
![]() |
4825163b20 | ||
![]() |
a37bea3701 | ||
![]() |
0d8f9351cc | ||
![]() |
692774f6c4 | ||
![]() |
6ee1404eef | ||
![]() |
97652bd2f6 | ||
![]() |
a566479ddc | ||
![]() |
44e62fbb04 | ||
![]() |
1f9e919762 | ||
![]() |
973752b974 | ||
![]() |
75bbc33fa2 | ||
![]() |
59a3a35b19 | ||
![]() |
b224ec50e4 | ||
![]() |
2925ef3db0 | ||
![]() |
c2d71ac789 | ||
![]() |
85f086d02e | ||
![]() |
beb3454f8d | ||
![]() |
807d08d8eb | ||
![]() |
cc4cfe1b5c | ||
![]() |
88f67230fc | ||
![]() |
d335dd4b83 | ||
![]() |
98e3dbceb5 | ||
![]() |
1c9ea0a9d9 | ||
![]() |
f6af73b222 | ||
![]() |
9354ed927b | ||
![]() |
545d140dcf | ||
![]() |
634122657c | ||
![]() |
349344161a | ||
![]() |
28a8863f45 | ||
![]() |
5c72c38c0d | ||
![]() |
fffed0f5e1 | ||
![]() |
bf4b76864d | ||
![]() |
10ad0010cf | ||
![]() |
3a99a7de78 | ||
![]() |
69139b35e1 | ||
![]() |
55a5739e77 | ||
![]() |
a8b48b4619 | ||
![]() |
dcb3accdb8 | ||
![]() |
45398f84cb | ||
![]() |
319cf64977 | ||
![]() |
646c02d855 | ||
![]() |
77dd2a87d9 | ||
![]() |
51059e99a5 | ||
![]() |
809df848ef | ||
![]() |
619675318c | ||
![]() |
081636b3e7 | ||
![]() |
b969144f50 | ||
![]() |
24bfa4919a | ||
![]() |
fcc9a80103 | ||
![]() |
99a365fb49 | ||
![]() |
6a95177b32 | ||
![]() |
ca68eaab38 | ||
![]() |
6234f7b7d2 | ||
![]() |
04f6a01c3d | ||
![]() |
9bad3c8101 | ||
![]() |
7398c6ab3e | ||
![]() |
4046534fa8 | ||
![]() |
8f43caee2e | ||
![]() |
83c5408f8f | ||
![]() |
7d4284d409 | ||
![]() |
58c4bf081b | ||
![]() |
d1478567f0 | ||
![]() |
d85c729fa5 | ||
![]() |
c65fadbd8a | ||
![]() |
4326007022 | ||
![]() |
38b01e9335 | ||
![]() |
22625a805d | ||
![]() |
a06c9d0cc6 | ||
![]() |
490ed86e86 | ||
![]() |
df2514d79f | ||
![]() |
13a8b10f5c | ||
![]() |
bb4f09ad9a | ||
![]() |
1f2683dd56 | ||
![]() |
0ba8babd87 | ||
![]() |
65d4d44f06 | ||
![]() |
6f8c366bad | ||
![]() |
3842e8e3a7 | ||
![]() |
b881a2a88a | ||
![]() |
70fcea0c2b | ||
![]() |
9f26bedf51 | ||
![]() |
2053cf23c2 | ||
![]() |
b801441201 | ||
![]() |
7209ed055a | ||
![]() |
894205eff7 | ||
![]() |
64b0b64468 | ||
![]() |
920df03cc1 | ||
![]() |
5a91f613ca | ||
![]() |
61eaa07b25 | ||
![]() |
62f6766e1b | ||
![]() |
f5994d2ae5 | ||
![]() |
7e93367394 | ||
![]() |
6256192c0c | ||
![]() |
08fb3ced5f | ||
![]() |
5aa5ce8b5e | ||
![]() |
7c389a6cf0 | ||
![]() |
f63ba0c20a | ||
![]() |
01e80108d7 | ||
![]() |
148c0c98d3 | ||
![]() |
11a9a2f56b | ||
![]() |
6cdf1c1689 | ||
![]() |
2cfaa4f261 | ||
![]() |
d3b0d03e70 | ||
![]() |
08b8978ee8 | ||
![]() |
d2019c2315 | ||
![]() |
02a7d0e797 | ||
![]() |
03751d2581 | ||
![]() |
b9069b25ad | ||
![]() |
a136fa687f | ||
![]() |
de35e89c58 | ||
![]() |
85beefec4c | ||
![]() |
877c9b007b | ||
![]() |
adb851a2b4 | ||
![]() |
6ab5116c34 | ||
![]() |
a5630a4a7d | ||
![]() |
e8c1a34f3b | ||
![]() |
88abeada44 | ||
![]() |
96a41704ea | ||
![]() |
8583c879f2 | ||
![]() |
3edc77c978 | ||
![]() |
03a1c21f34 | ||
![]() |
80b1a6297b | ||
![]() |
056eb888f3 | ||
![]() |
d4ec608123 | ||
![]() |
2451cf77f9 | ||
![]() |
3b6b77c75b | ||
![]() |
e0f578c135 | ||
![]() |
ec2ae15e3f | ||
![]() |
f5fc66f47e | ||
![]() |
ae79df8c55 | ||
![]() |
104aef3dec | ||
![]() |
17e62c10d4 | ||
![]() |
90965a4f4d | ||
![]() |
8960f5fef9 | ||
![]() |
783a8242e1 | ||
![]() |
7a8f5c0cc9 | ||
![]() |
53be012b34 | ||
![]() |
be7b3a56f9 | ||
![]() |
554e5b7be5 | ||
![]() |
249c89669e | ||
![]() |
7ce9a937b1 | ||
![]() |
456c011f3e | ||
![]() |
a31b9f1b4d | ||
![]() |
a1cf18468b | ||
![]() |
f147a5e909 | ||
![]() |
8d541595b8 | ||
![]() |
32fd8270d7 | ||
![]() |
efddbfcfa0 | ||
![]() |
0b20725f5f | ||
![]() |
030566c1e8 | ||
![]() |
fef2c44cb8 | ||
![]() |
fe5431976d | ||
![]() |
72dedc7596 | ||
![]() |
8615b799c6 | ||
![]() |
fd6cae48b7 | ||
![]() |
ecadc06b45 | ||
![]() |
e5d31d85dd | ||
![]() |
e427ffca5f | ||
![]() |
4f05bd9e22 | ||
![]() |
0d8c0ac1a0 | ||
![]() |
3984702d3e | ||
![]() |
979085a9de | ||
![]() |
7a6fc573c2 | ||
![]() |
b99b13251f | ||
![]() |
288d173a4d | ||
![]() |
2c69fe8c53 | ||
![]() |
62dafac72b | ||
![]() |
22929672a0 | ||
![]() |
ae0eac3415 | ||
![]() |
6929a9c603 | ||
![]() |
41bb677ebe | ||
![]() |
8368fb4408 | ||
![]() |
acbb7e0453 | ||
![]() |
4ea7d826bc | ||
![]() |
336214d97f | ||
![]() |
c9a0ae6e2d | ||
![]() |
6224cb6994 | ||
![]() |
29fefa1d60 | ||
![]() |
0bc69fb9b3 | ||
![]() |
6e7366bf69 | ||
![]() |
8ee4aa9e63 | ||
![]() |
c7a98fa5a1 | ||
![]() |
46565715c9 | ||
![]() |
386c3ea1ca | ||
![]() |
c2f3e43ee5 | ||
![]() |
7354988ec9 | ||
![]() |
8a8b04ed00 | ||
![]() |
e721481757 | ||
![]() |
2933d642ed | ||
![]() |
53dedc6c65 | ||
![]() |
7d412a9913 | ||
![]() |
de3b9a5bb2 | ||
![]() |
5eaa6dafd9 | ||
![]() |
8d496e1511 | ||
![]() |
f994b378f1 | ||
![]() |
01bd88ce10 | ||
![]() |
18b5fd59a6 | ||
![]() |
750c1d5013 | ||
![]() |
f2226cdec2 | ||
![]() |
c125ec087a | ||
![]() |
f099f66065 | ||
![]() |
4fcf99faa7 | ||
![]() |
2add88ccc2 | ||
![]() |
7d6dfaad15 | ||
![]() |
def2eadc24 | ||
![]() |
53a25dde26 | ||
![]() |
6f7da16d1d | ||
![]() |
5ac0360494 | ||
![]() |
1b6def4875 | ||
![]() |
52fcf64cfd | ||
![]() |
c650e23432 | ||
![]() |
428604d91d | ||
![]() |
aa94ec7949 | ||
![]() |
d0c1481f76 | ||
![]() |
6cc9a99b77 | ||
![]() |
d25f49b694 | ||
![]() |
b92d25e28a | ||
![]() |
bf5c5bc46f | ||
![]() |
e7cc842be4 | ||
![]() |
cb29d35949 | ||
![]() |
fe18f70e51 | ||
![]() |
ee57f26415 | ||
![]() |
721ec8e559 | ||
![]() |
c584f83071 | ||
![]() |
3c2fed5041 | ||
![]() |
7e6d974438 | ||
![]() |
c95a30c837 | ||
![]() |
cb568d005e | ||
![]() |
442cce1574 | ||
![]() |
c25baf25ad | ||
![]() |
5e279405c7 | ||
![]() |
7b4ecfd30a | ||
![]() |
e5707b423f | ||
![]() |
7983556f98 | ||
![]() |
1916dff57b | ||
![]() |
b11563d618 | ||
![]() |
b180a587bf | ||
![]() |
5b11e0ce29 | ||
![]() |
d6684c5806 | ||
![]() |
9d9e789f4b | ||
![]() |
1a0e3890f4 | ||
![]() |
caece9d6ad | ||
![]() |
953a3793c4 | ||
![]() |
8bfae3b4cf | ||
![]() |
6911685bd0 | ||
![]() |
71025eaf4d | ||
![]() |
3aa612b766 | ||
![]() |
a2ffd0ae83 | ||
![]() |
c399da586e | ||
![]() |
d7826e4e6c | ||
![]() |
f5d13c9079 | ||
![]() |
01a142790f | ||
![]() |
df54687de1 | ||
![]() |
bded31b311 | ||
![]() |
67e573aff7 | ||
![]() |
6295c4ac76 | ||
![]() |
469811847f | ||
![]() |
8a1aefefca | ||
![]() |
bea16028a1 | ||
![]() |
bedb7d1d9e | ||
![]() |
1a3a20f478 | ||
![]() |
68ecb7c219 | ||
![]() |
61b04a882b | ||
![]() |
f8e621c5b9 | ||
![]() |
2f2209682e | ||
![]() |
f4f361b51a | ||
![]() |
55e59f8cb0 | ||
![]() |
6d20ed0a22 | ||
![]() |
874f604295 | ||
![]() |
30d36a11c1 | ||
![]() |
09dcc29175 | ||
![]() |
8f07e6f141 | ||
![]() |
7b6b5724e1 | ||
![]() |
521c0b58c8 | ||
![]() |
53839ab7b1 | ||
![]() |
dcfe9617b3 | ||
![]() |
58eebf2dbd | ||
![]() |
af9b64c6f0 | ||
![]() |
2b18ac8d4e | ||
![]() |
2306234063 | ||
![]() |
883a9e422e | ||
![]() |
d77ce721e3 | ||
![]() |
325ad6f721 | ||
![]() |
d762a9365f | ||
![]() |
ce983f043e | ||
![]() |
45b7ebbe46 | ||
![]() |
3e7fa66790 | ||
![]() |
ad543dbffb | ||
![]() |
cdd2c7be9a | ||
![]() |
ddf6945190 | ||
![]() |
f2745747ba | ||
![]() |
ff9d179c13 | ||
![]() |
e813108c66 | ||
![]() |
62d8cdfcf9 | ||
![]() |
5b9d46e350 | ||
![]() |
e5db95b2d2 | ||
![]() |
a8f7c7c999 | ||
![]() |
8a423fb775 | ||
![]() |
90c3d69af6 | ||
![]() |
bcb2d73c5c | ||
![]() |
8a6cea12e1 | ||
![]() |
0056de146a | ||
![]() |
0bcdbef11e | ||
![]() |
1b208cb531 | ||
![]() |
6a975e260c | ||
![]() |
02d2bde269 | ||
![]() |
70cfa7f48a | ||
![]() |
b7d4b9c21b | ||
![]() |
673c947c11 | ||
![]() |
2682a55148 | ||
![]() |
616f6ddf5f | ||
![]() |
29769813bc | ||
![]() |
221c46344a | ||
![]() |
a33eb25c92 | ||
![]() |
1dc61320a6 | ||
![]() |
ad556a43f9 | ||
![]() |
12e6701ffa | ||
![]() |
7167b66719 | ||
![]() |
a52ba5fbd1 | ||
![]() |
22cf903656 | ||
![]() |
d77b657036 | ||
![]() |
4a3038c12c | ||
![]() |
3ac7cd5d4a | ||
![]() |
58eddd2b42 | ||
![]() |
d808da68bd | ||
![]() |
2ed4d1efa0 | ||
![]() |
6ce613acd2 | ||
![]() |
fcb9e13a84 | ||
![]() |
3ada2f3279 | ||
![]() |
8d2d45ae4e | ||
![]() |
c9e6963387 | ||
![]() |
6d36b0e28c | ||
![]() |
aa38e2d409 | ||
![]() |
61117bb34f | ||
![]() |
86a3c32844 | ||
![]() |
b855b3e103 | ||
![]() |
80edeebab9 | ||
![]() |
f366e287b1 | ||
![]() |
9ce8684aba | ||
![]() |
caa6ea531c | ||
![]() |
cca1183ee3 | ||
![]() |
0f9c97aea0 | ||
![]() |
8d08aa8c79 | ||
![]() |
eebcab435d | ||
![]() |
76d3c6e237 | ||
![]() |
a820ca1e90 | ||
![]() |
fce4e5e382 | ||
![]() |
39260d172f | ||
![]() |
e646528b86 | ||
![]() |
86726102fb | ||
![]() |
1330558819 | ||
![]() |
b4ab0fc10b | ||
![]() |
15becf9ef6 | ||
![]() |
ef3785ce9f | ||
![]() |
134e13005d | ||
![]() |
eb5e7ba3f3 | ||
![]() |
dccd9b2541 | ||
![]() |
de83ad7a7a | ||
![]() |
7e55b9e6b8 | ||
![]() |
1b74ca47bf | ||
![]() |
c3d4be9ceb | ||
![]() |
b8d0c7f7c7 | ||
![]() |
92bce4078f | ||
![]() |
ff8f0697c2 | ||
![]() |
dddba7af00 | ||
![]() |
14a49d6664 | ||
![]() |
22da402d56 | ||
![]() |
aa4acc6572 | ||
![]() |
4d432fba57 | ||
![]() |
97b71c785b | ||
![]() |
8a93284bb3 | ||
![]() |
bb2abe4efc | ||
![]() |
ccada33caf | ||
![]() |
c5f15ee6ba | ||
![]() |
6f240ec681 | ||
![]() |
fc6aef138d | ||
![]() |
ae2e8e7402 | ||
![]() |
6d0eb05954 | ||
![]() |
96fbbc55e1 | ||
![]() |
7e74502ba3 | ||
![]() |
b273b31b03 | ||
![]() |
cf00ac74c6 | ||
![]() |
cc702f0fb3 | ||
![]() |
cc6eb5789d | ||
![]() |
669b80a9e1 | ||
![]() |
4c4fddee94 | ||
![]() |
b28a4e6b50 | ||
![]() |
bdd6a55a84 | ||
![]() |
d1ebc06994 | ||
![]() |
2a150788b4 | ||
![]() |
b854d23431 | ||
![]() |
72caf72e80 | ||
![]() |
a6ff1899df | ||
![]() |
6a999597df | ||
![]() |
219fc9e53a | ||
![]() |
861959ed2d | ||
![]() |
f7f50294e7 | ||
![]() |
a226333c1e | ||
![]() |
75f18aa69b | ||
![]() |
60ff4fdc1f | ||
![]() |
8d14cb0ab7 | ||
![]() |
606c809880 | ||
![]() |
f1692038f8 | ||
![]() |
79f5ec0cd5 | ||
![]() |
416a2a080d | ||
![]() |
92dc8b1561 | ||
![]() |
07b807adfc | ||
![]() |
843430ef41 | ||
![]() |
b5b2392dd2 | ||
![]() |
ef735d65cf | ||
![]() |
bf24740c7b | ||
![]() |
4ec11c7cf6 | ||
![]() |
2803e6aa95 | ||
![]() |
8ff36d0ccf | ||
![]() |
e7e465df69 | ||
![]() |
0c042079ed | ||
![]() |
a5a9bcafa7 | ||
![]() |
867f625b0a | ||
![]() |
3876c67588 | ||
![]() |
93158bb3af | ||
![]() |
5c47d8652d | ||
![]() |
eda0d12867 | ||
![]() |
4a53de4466 | ||
![]() |
e730649a8d | ||
![]() |
3a94deef69 | ||
![]() |
c1c186d279 | ||
![]() |
7356db919a | ||
![]() |
44157a5df3 | ||
![]() |
2acd1ff5e8 | ||
![]() |
150a5571cf | ||
![]() |
1eb25f4829 | ||
![]() |
d8d4ecf79f | ||
![]() |
081bd98e98 | ||
![]() |
6134f415e9 | ||
![]() |
b6a7581eca | ||
![]() |
7727f34e8f | ||
![]() |
9b20e1cf56 | ||
![]() |
b901ecacca | ||
![]() |
7691f7eb05 | ||
![]() |
8c0c56b954 | ||
![]() |
d968a20862 | ||
![]() |
9f1cd80a31 | ||
![]() |
5a9ccc5ae7 | ||
![]() |
6d7b0c5626 | ||
![]() |
400b8034e1 | ||
![]() |
05a22e3271 | ||
![]() |
c1f76e0565 | ||
![]() |
4582c3ba0a | ||
![]() |
f4ee734ea3 | ||
![]() |
2087028c47 | ||
![]() |
37a56b250a | ||
![]() |
71a41be20a | ||
![]() |
ffb19b31a5 | ||
![]() |
db68c7faa9 | ||
![]() |
07ae958eb0 | ||
![]() |
b62b5f6575 | ||
![]() |
2e1fb9df66 | ||
![]() |
31c91cea9a | ||
![]() |
9dc844ca28 | ||
![]() |
02ebc028c8 | ||
![]() |
5d35605b82 | ||
![]() |
22e86af5b3 | ||
![]() |
8c39ed46a8 | ||
![]() |
5965c3fdaa | ||
![]() |
15a5d2bc38 | ||
![]() |
0432cc95fc | ||
![]() |
6dafaac021 | ||
![]() |
d8929c9252 | ||
![]() |
5fa3a720b3 | ||
![]() |
6d3b838b6a | ||
![]() |
58e0179321 | ||
![]() |
eaf7e29b8a | ||
![]() |
260f1df1b9 | ||
![]() |
a88a4ef82c | ||
![]() |
075cca5991 | ||
![]() |
1d2dc37f75 | ||
![]() |
3da7025d78 | ||
![]() |
15b1d8ee14 | ||
![]() |
239d8fa948 | ||
![]() |
1de2e6161d | ||
![]() |
3e7f008277 | ||
![]() |
31a93d360d | ||
![]() |
2afd2788e2 | ||
![]() |
322fa99147 | ||
![]() |
c43ad52ff1 | ||
![]() |
6aa9737481 | ||
![]() |
7d9d6b99d9 | ||
![]() |
9c69e6f87c | ||
![]() |
0c90021895 | ||
![]() |
9163b9c124 | ||
![]() |
61717e1529 | ||
![]() |
168d418c27 | ||
![]() |
c787c920fc | ||
![]() |
1526209f82 | ||
![]() |
cf355c419d | ||
![]() |
eef024587b | ||
![]() |
270d463d02 | ||
![]() |
0735705dd3 | ||
![]() |
0a1dbe6d9d | ||
![]() |
15395275ba | ||
![]() |
6e66ba202f | ||
![]() |
5ebe1e0369 | ||
![]() |
860ab7a3ba | ||
![]() |
d499640304 | ||
![]() |
4f3f516767 | ||
![]() |
0996dbf2a1 | ||
![]() |
bc59e52cea | ||
![]() |
b8d4e957e2 | ||
![]() |
8002ec75bc | ||
![]() |
a45eefa742 | ||
![]() |
a1236924aa | ||
![]() |
9320e8c1a3 | ||
![]() |
addcd3a983 | ||
![]() |
e1dc73e992 | ||
![]() |
ba8849ed4d | ||
![]() |
36bca04341 | ||
![]() |
fb95de1f73 | ||
![]() |
3addfc3548 | ||
![]() |
e2e80d1f49 | ||
![]() |
a96eba2637 | ||
![]() |
274810b954 | ||
![]() |
842df983c3 | ||
![]() |
0eeadcd31a | ||
![]() |
8d37c5612b | ||
![]() |
e94461f7fe | ||
![]() |
f5edee1e91 | ||
![]() |
98cdbb4559 | ||
![]() |
f3f63d95b5 | ||
![]() |
244340f211 | ||
![]() |
75626431b1 | ||
![]() |
244868348b | ||
![]() |
a909c6d905 | ||
![]() |
f2efff9d71 | ||
![]() |
08a7a10e1c | ||
![]() |
b35e5abd83 | ||
![]() |
291e9fc0a2 | ||
![]() |
18b5215ce6 | ||
![]() |
00a311bd63 | ||
![]() |
749c2ab8ac | ||
![]() |
d06fdeb265 | ||
![]() |
06d76be2c2 | ||
![]() |
6728e8d107 | ||
![]() |
533e2bed8a | ||
![]() |
310a08f3e6 | ||
![]() |
0566889a1e | ||
![]() |
ddca7584ef | ||
![]() |
e6cfe74cac | ||
![]() |
3b553a3a4b | ||
![]() |
3d674cf237 | ||
![]() |
4e6e924a40 | ||
![]() |
073ead5828 | ||
![]() |
fdaefadd18 |
@@ -5,6 +5,7 @@
|
|||||||
"context": ".."
|
"context": ".."
|
||||||
},
|
},
|
||||||
"appPort": "8124:8123",
|
"appPort": "8124:8123",
|
||||||
|
"postCreateCommand": "sudo apt update && sudo apt upgrade -y && sudo apt install -y libpcap-dev",
|
||||||
"postStartCommand": "script/bootstrap",
|
"postStartCommand": "script/bootstrap",
|
||||||
"containerEnv": {
|
"containerEnv": {
|
||||||
"WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}"
|
"WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}"
|
||||||
|
3
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
3
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -9,7 +9,7 @@ body:
|
|||||||
|
|
||||||
If you have a feature or enhancement request for the frontend, please [start an discussion][fr] instead of creating an issue.
|
If you have a feature or enhancement request for the frontend, please [start an discussion][fr] instead of creating an issue.
|
||||||
|
|
||||||
**Please not not report issues for custom cards.**
|
**Please do not report issues for custom cards.**
|
||||||
|
|
||||||
[fr]: https://github.com/home-assistant/frontend/discussions
|
[fr]: https://github.com/home-assistant/frontend/discussions
|
||||||
[releases]: https://github.com/home-assistant/home-assistant/releases
|
[releases]: https://github.com/home-assistant/home-assistant/releases
|
||||||
@@ -24,6 +24,7 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: I have tried a different browser to see if it is related to my browser.
|
- label: I have tried a different browser to see if it is related to my browser.
|
||||||
required: true
|
required: true
|
||||||
|
- label: I have tried reproducing the issue in [safe mode](https://www.home-assistant.io/blog/2023/11/01/release-202311/#restarting-into-safe-mode) to rule out problems with unsupported custom resources.
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
|
56
.github/labeler.yml
vendored
56
.github/labeler.yml
vendored
@@ -1,31 +1,51 @@
|
|||||||
Build:
|
Build:
|
||||||
- build-scripts/**
|
- changed-files:
|
||||||
- .browserslistrc
|
- any-glob-to-any-file:
|
||||||
- gulpfile.js
|
- build-scripts/**
|
||||||
|
- .browserslistrc
|
||||||
|
- gulpfile.js
|
||||||
|
|
||||||
Cast:
|
Cast:
|
||||||
- cast/src/**
|
- changed-files:
|
||||||
- src/cast/**
|
- any-glob-to-any-file:
|
||||||
|
- cast/src/**
|
||||||
|
- src/cast/**
|
||||||
|
|
||||||
Demo:
|
Demo:
|
||||||
- demo/src/**
|
- changed-files:
|
||||||
- src/fake_data/**
|
- any-glob-to-any-file:
|
||||||
|
- demo/src/**
|
||||||
|
- src/fake_data/**
|
||||||
|
|
||||||
Design:
|
Design:
|
||||||
- gallery/src/**
|
- changed-files:
|
||||||
- src/fake_data/**
|
- any-glob-to-any-file:
|
||||||
|
- gallery/src/**
|
||||||
|
- src/fake_data/**
|
||||||
|
|
||||||
Dependencies:
|
Dependencies:
|
||||||
- package.json
|
- any:
|
||||||
- renovate.json
|
- changed-files:
|
||||||
- yarn.lock
|
# Match when only these files are changed (i.e. don't match PRs that happen to add or remove packages)
|
||||||
- .yarn/**
|
- any-glob-to-all-files:
|
||||||
- .yarnrc.yml
|
- package.json
|
||||||
- .nvmrc
|
- renovate.json
|
||||||
|
- yarn.lock
|
||||||
|
- .yarn/**
|
||||||
|
- .yarnrc.yml
|
||||||
|
- .nvmrc
|
||||||
|
# Dependabot and Renovate branches always match (i.e. compatibility tweaks by members considered minor)
|
||||||
|
- head-branch:
|
||||||
|
- "^renovate/"
|
||||||
|
- "^dependabot/"
|
||||||
|
|
||||||
GitHub Actions:
|
GitHub Actions:
|
||||||
- .github/workflows/**
|
- changed-files:
|
||||||
- .github/*.yml
|
- any-glob-to-any-file:
|
||||||
|
- .github/workflows/**
|
||||||
|
- .github/*.yml
|
||||||
|
|
||||||
Supervisor:
|
Supervisor:
|
||||||
- hassio/src/**
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- hassio/src/**
|
||||||
|
4
.github/workflows/cast_deployment.yaml
vendored
4
.github/workflows/cast_deployment.yaml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
ref: dev
|
ref: dev
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.0.0
|
uses: actions/setup-node@v4.0.2
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
@@ -62,7 +62,7 @@ jobs:
|
|||||||
ref: master
|
ref: master
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.0.0
|
uses: actions/setup-node@v4.0.2
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
19
.github/workflows/ci.yaml
vendored
19
.github/workflows/ci.yaml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
- name: Check out files from GitHub
|
- name: Check out files from GitHub
|
||||||
uses: actions/checkout@v4.1.1
|
uses: actions/checkout@v4.1.1
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.0.0
|
uses: actions/setup-node@v4.0.2
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
@@ -37,17 +37,20 @@ jobs:
|
|||||||
- name: Build resources
|
- name: Build resources
|
||||||
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data gather-gallery-pages
|
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data gather-gallery-pages
|
||||||
- name: Setup lint cache
|
- name: Setup lint cache
|
||||||
uses: actions/cache@v3.3.2
|
uses: actions/cache@v4.0.0
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
node_modules/.cache/prettier
|
node_modules/.cache/prettier
|
||||||
node_modules/.cache/eslint
|
node_modules/.cache/eslint
|
||||||
|
node_modules/.cache/typescript
|
||||||
key: lint-${{ github.sha }}
|
key: lint-${{ github.sha }}
|
||||||
restore-keys: lint-
|
restore-keys: lint-
|
||||||
- name: Run eslint
|
- name: Run eslint
|
||||||
run: yarn run lint:eslint --quiet
|
run: yarn run lint:eslint --quiet
|
||||||
- name: Run tsc
|
- name: Run tsc
|
||||||
run: yarn run lint:types
|
run: yarn run lint:types
|
||||||
|
- name: Run lit-analyzer
|
||||||
|
run: yarn run lint:lit --quiet
|
||||||
- name: Run prettier
|
- name: Run prettier
|
||||||
run: yarn run lint:prettier
|
run: yarn run lint:prettier
|
||||||
test:
|
test:
|
||||||
@@ -57,14 +60,14 @@ jobs:
|
|||||||
- name: Check out files from GitHub
|
- name: Check out files from GitHub
|
||||||
uses: actions/checkout@v4.1.1
|
uses: actions/checkout@v4.1.1
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.0.0
|
uses: actions/setup-node@v4.0.2
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install --immutable
|
run: yarn install --immutable
|
||||||
- name: Build resources
|
- name: Build resources
|
||||||
run: ./node_modules/.bin/gulp build-translations build-locale-data
|
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: yarn run test
|
run: yarn run test
|
||||||
build:
|
build:
|
||||||
@@ -75,7 +78,7 @@ jobs:
|
|||||||
- name: Check out files from GitHub
|
- name: Check out files from GitHub
|
||||||
uses: actions/checkout@v4.1.1
|
uses: actions/checkout@v4.1.1
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.0.0
|
uses: actions/setup-node@v4.0.2
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
@@ -86,7 +89,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
IS_TEST: "true"
|
IS_TEST: "true"
|
||||||
- name: Upload bundle stats
|
- name: Upload bundle stats
|
||||||
uses: actions/upload-artifact@v3.1.3
|
uses: actions/upload-artifact@v4.3.1
|
||||||
with:
|
with:
|
||||||
name: frontend-bundle-stats
|
name: frontend-bundle-stats
|
||||||
path: build/stats/*.json
|
path: build/stats/*.json
|
||||||
@@ -99,7 +102,7 @@ jobs:
|
|||||||
- name: Check out files from GitHub
|
- name: Check out files from GitHub
|
||||||
uses: actions/checkout@v4.1.1
|
uses: actions/checkout@v4.1.1
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.0.0
|
uses: actions/setup-node@v4.0.2
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
@@ -110,7 +113,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
IS_TEST: "true"
|
IS_TEST: "true"
|
||||||
- name: Upload bundle stats
|
- name: Upload bundle stats
|
||||||
uses: actions/upload-artifact@v3.1.3
|
uses: actions/upload-artifact@v4.3.1
|
||||||
with:
|
with:
|
||||||
name: supervisor-bundle-stats
|
name: supervisor-bundle-stats
|
||||||
path: build/stats/*.json
|
path: build/stats/*.json
|
||||||
|
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -36,14 +36,14 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v3
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v2
|
uses: github/codeql-action/autobuild@v3
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
@@ -57,4 +57,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v3
|
||||||
|
4
.github/workflows/demo_deployment.yaml
vendored
4
.github/workflows/demo_deployment.yaml
vendored
@@ -27,7 +27,7 @@ jobs:
|
|||||||
ref: dev
|
ref: dev
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.0.0
|
uses: actions/setup-node@v4.0.2
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
@@ -63,7 +63,7 @@ jobs:
|
|||||||
ref: master
|
ref: master
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.0.0
|
uses: actions/setup-node@v4.0.2
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
2
.github/workflows/design_deployment.yaml
vendored
2
.github/workflows/design_deployment.yaml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4.1.1
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.0.0
|
uses: actions/setup-node@v4.0.2
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
2
.github/workflows/design_preview.yaml
vendored
2
.github/workflows/design_preview.yaml
vendored
@@ -24,7 +24,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4.1.1
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.0.0
|
uses: actions/setup-node@v4.0.2
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
2
.github/workflows/labeler.yaml
vendored
2
.github/workflows/labeler.yaml
vendored
@@ -10,6 +10,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Apply labels
|
- name: Apply labels
|
||||||
uses: actions/labeler@v4.3.0
|
uses: actions/labeler@v5.0.0
|
||||||
with:
|
with:
|
||||||
sync-labels: true
|
sync-labels: true
|
||||||
|
3
.github/workflows/lock.yml
vendored
3
.github/workflows/lock.yml
vendored
@@ -9,9 +9,10 @@ jobs:
|
|||||||
lock:
|
lock:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/lock-threads@v4.0.1
|
- uses: dessant/lock-threads@v5.0.1
|
||||||
with:
|
with:
|
||||||
github-token: ${{ github.token }}
|
github-token: ${{ github.token }}
|
||||||
|
process-only: "issues, prs"
|
||||||
issue-lock-inactive-days: "30"
|
issue-lock-inactive-days: "30"
|
||||||
issue-exclude-created-before: "2020-10-01T00:00:00Z"
|
issue-exclude-created-before: "2020-10-01T00:00:00Z"
|
||||||
issue-lock-reason: ""
|
issue-lock-reason: ""
|
||||||
|
10
.github/workflows/nightly.yaml
vendored
10
.github/workflows/nightly.yaml
vendored
@@ -23,12 +23,12 @@ jobs:
|
|||||||
uses: actions/checkout@v4.1.1
|
uses: actions/checkout@v4.1.1
|
||||||
|
|
||||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.0.0
|
uses: actions/setup-node@v4.0.2
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
@@ -42,7 +42,7 @@ jobs:
|
|||||||
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
|
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
|
||||||
|
|
||||||
- name: Bump version
|
- name: Bump version
|
||||||
run: script/version_bump.cjs nightly
|
run: script/version_bump.js nightly
|
||||||
|
|
||||||
- name: Build nightly Python wheels
|
- name: Build nightly Python wheels
|
||||||
run: |
|
run: |
|
||||||
@@ -57,14 +57,14 @@ jobs:
|
|||||||
run: tar -czvf translations.tar.gz translations
|
run: tar -czvf translations.tar.gz translations
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
uses: actions/upload-artifact@v3.1.3
|
uses: actions/upload-artifact@v4.3.1
|
||||||
with:
|
with:
|
||||||
name: wheels
|
name: wheels
|
||||||
path: dist/home_assistant_frontend*.whl
|
path: dist/home_assistant_frontend*.whl
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload translations
|
- name: Upload translations
|
||||||
uses: actions/upload-artifact@v3.1.3
|
uses: actions/upload-artifact@v4.3.1
|
||||||
with:
|
with:
|
||||||
name: translations
|
name: translations
|
||||||
path: translations.tar.gz
|
path: translations.tar.gz
|
||||||
|
2
.github/workflows/release-drafter.yaml
vendored
2
.github/workflows/release-drafter.yaml
vendored
@@ -18,6 +18,6 @@ jobs:
|
|||||||
pull-requests: read
|
pull-requests: read
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: release-drafter/release-drafter@v5
|
- uses: release-drafter/release-drafter@v6.0.0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
6
.github/workflows/release.yaml
vendored
6
.github/workflows/release.yaml
vendored
@@ -29,12 +29,12 @@ jobs:
|
|||||||
uses: home-assistant/actions/helpers/verify-version@master
|
uses: home-assistant/actions/helpers/verify-version@master
|
||||||
|
|
||||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ env.PYTHON_VERSION }}
|
python-version: ${{ env.PYTHON_VERSION }}
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4.0.0
|
uses: actions/setup-node@v4.0.2
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: yarn
|
cache: yarn
|
||||||
@@ -74,7 +74,7 @@ jobs:
|
|||||||
echo "home-assistant-frontend==$version" > ./requirements.txt
|
echo "home-assistant-frontend==$version" > ./requirements.txt
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
uses: home-assistant/wheels@2023.10.5
|
uses: home-assistant/wheels@2024.01.0
|
||||||
with:
|
with:
|
||||||
abi: cp311
|
abi: cp311
|
||||||
tag: musllinux_1_2
|
tag: musllinux_1_2
|
||||||
|
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 90 days stale policy
|
- name: 90 days stale policy
|
||||||
uses: actions/stale@v8.0.0
|
uses: actions/stale@v9.0.0
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
days-before-stale: 90
|
days-before-stale: 90
|
||||||
|
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/simple-tooltip.js b/simple-tooltip.js
|
||||||
|
index 78a87f6a223925f0e29fbedb268c85a142ec6985..3d686dd6a3d5a93342b4b01408089fc316b408ca 100644
|
||||||
|
--- a/simple-tooltip.js
|
||||||
|
+++ b/simple-tooltip.js
|
||||||
|
@@ -195,6 +195,8 @@ class SimpleTooltip extends LitElement {
|
||||||
|
.hidden {
|
||||||
|
position: absolute;
|
||||||
|
left: -10000px;
|
||||||
|
+ inset-inline-start: -10000px;
|
||||||
|
+ inset-inline-end: initial;
|
||||||
|
top: auto;
|
||||||
|
width: 1px;
|
||||||
|
height: 1px;
|
@@ -1,39 +0,0 @@
|
|||||||
diff --git a/modular/sortable.complete.esm.js b/modular/sortable.complete.esm.js
|
|
||||||
index 02e9f2d6bebeb430fe6e7c1cc3f9c3c9df051f14..bb8268b0844a1faa4108cc92c0be2a3dbaf23f83 100644
|
|
||||||
--- a/modular/sortable.complete.esm.js
|
|
||||||
+++ b/modular/sortable.complete.esm.js
|
|
||||||
@@ -1657,7 +1657,7 @@ Sortable.prototype =
|
|
||||||
target = parent; // store last element
|
|
||||||
}
|
|
||||||
/* jshint boss:true */
|
|
||||||
- while (parent = parent.parentNode);
|
|
||||||
+ while (parent = parent.parentNode || parent.getRootNode().host);
|
|
||||||
}
|
|
||||||
|
|
||||||
_unhideGhostForTarget();
|
|
||||||
diff --git a/modular/sortable.core.esm.js b/modular/sortable.core.esm.js
|
|
||||||
index b04c8b4634f7c6b4ef1aadbb48afe6564306dea9..39a107163c8c336ebd669b5ea8a936af87e1c1e7 100644
|
|
||||||
--- a/modular/sortable.core.esm.js
|
|
||||||
+++ b/modular/sortable.core.esm.js
|
|
||||||
@@ -1657,7 +1657,7 @@ Sortable.prototype =
|
|
||||||
target = parent; // store last element
|
|
||||||
}
|
|
||||||
/* jshint boss:true */
|
|
||||||
- while (parent = parent.parentNode);
|
|
||||||
+ while (parent = parent.parentNode || parent.getRootNode().host);
|
|
||||||
}
|
|
||||||
|
|
||||||
_unhideGhostForTarget();
|
|
||||||
diff --git a/modular/sortable.esm.js b/modular/sortable.esm.js
|
|
||||||
index 6ec7ed1bb557e21c2578200161e989c65d23150b..0a05475a22904472fac6c13f524c674da76584b0 100644
|
|
||||||
--- a/modular/sortable.esm.js
|
|
||||||
+++ b/modular/sortable.esm.js
|
|
||||||
@@ -1657,7 +1657,7 @@ Sortable.prototype =
|
|
||||||
target = parent; // store last element
|
|
||||||
}
|
|
||||||
/* jshint boss:true */
|
|
||||||
- while (parent = parent.parentNode);
|
|
||||||
+ while (parent = parent.parentNode || parent.getRootNode().host);
|
|
||||||
}
|
|
||||||
|
|
||||||
_unhideGhostForTarget();
|
|
73
.yarn/patches/sortablejs-npm-1.15.2-73347ae85a.patch
Normal file
73
.yarn/patches/sortablejs-npm-1.15.2-73347ae85a.patch
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
diff --git a/modular/sortable.core.esm.js b/modular/sortable.core.esm.js
|
||||||
|
index 93ba17509e2e8583ab241fea6845fbe714c584a2..de0651ddb5dced30d36f7d764da0dd0b441f523f 100644
|
||||||
|
--- a/modular/sortable.core.esm.js
|
||||||
|
+++ b/modular/sortable.core.esm.js
|
||||||
|
@@ -1461,7 +1461,7 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
||||||
|
}
|
||||||
|
target = parent; // store last element
|
||||||
|
}
|
||||||
|
- /* jshint boss:true */ while (parent = parent.parentNode);
|
||||||
|
+ /* jshint boss:true */ while (parent = parent.parentNode || parent.getRootNode().host);
|
||||||
|
}
|
||||||
|
_unhideGhostForTarget();
|
||||||
|
}
|
||||||
|
@@ -1781,11 +1781,16 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
||||||
|
}
|
||||||
|
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
|
||||||
|
capture();
|
||||||
|
- if (elLastChild && elLastChild.nextSibling) {
|
||||||
|
- // the last draggable element is not the last node
|
||||||
|
- el.insertBefore(dragEl, elLastChild.nextSibling);
|
||||||
|
- } else {
|
||||||
|
- el.appendChild(dragEl);
|
||||||
|
+ try {
|
||||||
|
+ if (elLastChild && elLastChild.nextSibling) {
|
||||||
|
+ // the last draggable element is not the last node
|
||||||
|
+ el.insertBefore(dragEl, elLastChild.nextSibling);
|
||||||
|
+ } else {
|
||||||
|
+ el.appendChild(dragEl);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ catch(err) {
|
||||||
|
+ return completed(false);
|
||||||
|
}
|
||||||
|
parentEl = el; // actualization
|
||||||
|
|
||||||
|
@@ -1802,7 +1807,13 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
||||||
|
targetRect = getRect(target);
|
||||||
|
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
|
||||||
|
capture();
|
||||||
|
- el.insertBefore(dragEl, firstChild);
|
||||||
|
+ try {
|
||||||
|
+ el.insertBefore(dragEl, firstChild);
|
||||||
|
+ }
|
||||||
|
+ catch(err) {
|
||||||
|
+ return completed(false);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
parentEl = el; // actualization
|
||||||
|
|
||||||
|
changed();
|
||||||
|
@@ -1849,12 +1860,17 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
||||||
|
_silent = true;
|
||||||
|
setTimeout(_unsilent, 30);
|
||||||
|
capture();
|
||||||
|
- if (after && !nextSibling) {
|
||||||
|
- el.appendChild(dragEl);
|
||||||
|
- } else {
|
||||||
|
- target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
|
||||||
|
- }
|
||||||
|
|
||||||
|
+ try {
|
||||||
|
+ if (after && !nextSibling) {
|
||||||
|
+ el.appendChild(dragEl);
|
||||||
|
+ } else {
|
||||||
|
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ catch(err) {
|
||||||
|
+ return completed(false);
|
||||||
|
+ }
|
||||||
|
// Undo chrome's scroll adjustment (has no effect on other browsers)
|
||||||
|
if (scrolledPastTop) {
|
||||||
|
scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
|
893
.yarn/releases/yarn-4.0.1.cjs
vendored
893
.yarn/releases/yarn-4.0.1.cjs
vendored
File diff suppressed because one or more lines are too long
893
.yarn/releases/yarn-4.1.0.cjs
vendored
Executable file
893
.yarn/releases/yarn-4.1.0.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
@@ -6,4 +6,4 @@ enableGlobalCache: false
|
|||||||
|
|
||||||
nodeLinker: node-modules
|
nodeLinker: node-modules
|
||||||
|
|
||||||
yarnPath: .yarn/releases/yarn-4.0.1.cjs
|
yarnPath: .yarn/releases/yarn-4.1.0.cjs
|
||||||
|
56
build-scripts/babel-plugins/custom-polyfill-plugin.js
Normal file
56
build-scripts/babel-plugins/custom-polyfill-plugin.js
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
import defineProvider from "@babel/helper-define-polyfill-provider";
|
||||||
|
|
||||||
|
// List of polyfill keys with supported browser targets for the functionality
|
||||||
|
const PolyfillSupport = {
|
||||||
|
fetch: {
|
||||||
|
android: 42,
|
||||||
|
chrome: 42,
|
||||||
|
edge: 14,
|
||||||
|
firefox: 39,
|
||||||
|
ios: 10.3,
|
||||||
|
opera: 29,
|
||||||
|
opera_mobile: 29,
|
||||||
|
safari: 10.1,
|
||||||
|
samsung: 4.0,
|
||||||
|
},
|
||||||
|
proxy: {
|
||||||
|
android: 49,
|
||||||
|
chrome: 49,
|
||||||
|
edge: 12,
|
||||||
|
firefox: 18,
|
||||||
|
ios: 10.0,
|
||||||
|
opera: 36,
|
||||||
|
opera_mobile: 36,
|
||||||
|
safari: 10.0,
|
||||||
|
samsung: 5.0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
// Map of global variables and/or instance and static properties to the
|
||||||
|
// corresponding polyfill key and actual module to import
|
||||||
|
const polyfillMap = {
|
||||||
|
global: {
|
||||||
|
Proxy: { key: "proxy", module: "proxy-polyfill" },
|
||||||
|
fetch: { key: "fetch", module: "unfetch/polyfill" },
|
||||||
|
},
|
||||||
|
instance: {},
|
||||||
|
static: {},
|
||||||
|
};
|
||||||
|
|
||||||
|
// Create plugin using the same factory as for CoreJS
|
||||||
|
export default defineProvider(
|
||||||
|
({ createMetaResolver, debug, shouldInjectPolyfill }) => {
|
||||||
|
const resolvePolyfill = createMetaResolver(polyfillMap);
|
||||||
|
return {
|
||||||
|
name: "HA Custom",
|
||||||
|
polyfills: PolyfillSupport,
|
||||||
|
usageGlobal(meta, utils) {
|
||||||
|
const polyfill = resolvePolyfill(meta);
|
||||||
|
if (polyfill && shouldInjectPolyfill(polyfill.desc.key)) {
|
||||||
|
debug(polyfill.desc.key);
|
||||||
|
utils.injectGlobalImport(polyfill.desc.module);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
@@ -1,6 +1,7 @@
|
|||||||
const path = require("path");
|
const path = require("path");
|
||||||
const env = require("./env.cjs");
|
const env = require("./env.cjs");
|
||||||
const paths = require("./paths.cjs");
|
const paths = require("./paths.cjs");
|
||||||
|
const { dependencies } = require("../package.json");
|
||||||
|
|
||||||
// GitHub base URL to use for production source maps
|
// GitHub base URL to use for production source maps
|
||||||
// Nightly builds use the commit SHA, otherwise assumes there is a tag that matches the version
|
// Nightly builds use the commit SHA, otherwise assumes there is a tag that matches the version
|
||||||
@@ -31,8 +32,6 @@ module.exports.emptyPackages = ({ latestBuild, isHassioBuild }) =>
|
|||||||
require.resolve(
|
require.resolve(
|
||||||
path.resolve(paths.polymer_dir, "src/resources/compatibility.ts")
|
path.resolve(paths.polymer_dir, "src/resources/compatibility.ts")
|
||||||
),
|
),
|
||||||
// This polyfill is loaded in workers to support ES5, filter it out.
|
|
||||||
latestBuild && require.resolve("proxy-polyfill/src/index.js"),
|
|
||||||
// Icons in supervisor conflict with icons in HA so we don't load.
|
// Icons in supervisor conflict with icons in HA so we don't load.
|
||||||
isHassioBuild &&
|
isHassioBuild &&
|
||||||
require.resolve(
|
require.resolve(
|
||||||
@@ -87,14 +86,12 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
|
|||||||
setSpreadProperties: true,
|
setSpreadProperties: true,
|
||||||
},
|
},
|
||||||
browserslistEnv: latestBuild ? "modern" : "legacy",
|
browserslistEnv: latestBuild ? "modern" : "legacy",
|
||||||
// Must be unambiguous because some dependencies are CommonJS only
|
|
||||||
sourceType: "unambiguous",
|
|
||||||
presets: [
|
presets: [
|
||||||
[
|
[
|
||||||
"@babel/preset-env",
|
"@babel/preset-env",
|
||||||
{
|
{
|
||||||
useBuiltIns: latestBuild ? false : "entry",
|
useBuiltIns: latestBuild ? false : "usage",
|
||||||
corejs: latestBuild ? false : { version: "3.33", proposals: true },
|
corejs: latestBuild ? false : dependencies["core-js"],
|
||||||
bugfixes: true,
|
bugfixes: true,
|
||||||
shippedProposals: true,
|
shippedProposals: true,
|
||||||
},
|
},
|
||||||
@@ -112,27 +109,39 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
|
|||||||
ignoreModuleNotFound: true,
|
ignoreModuleNotFound: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
path.resolve(
|
||||||
|
paths.polymer_dir,
|
||||||
|
"build-scripts/babel-plugins/custom-polyfill-plugin.js"
|
||||||
|
),
|
||||||
|
{ method: "usage-global" },
|
||||||
|
],
|
||||||
// Minify template literals for production
|
// Minify template literals for production
|
||||||
isProdBuild && [
|
isProdBuild && [
|
||||||
"template-html-minifier",
|
"template-html-minifier",
|
||||||
{
|
{
|
||||||
modules: {
|
modules: {
|
||||||
lit: [
|
...Object.fromEntries(
|
||||||
"html",
|
["lit", "lit-element", "lit-html"].map((m) => [
|
||||||
{ name: "svg", encapsulation: "svg" },
|
m,
|
||||||
{ name: "css", encapsulation: "style" },
|
[
|
||||||
],
|
"html",
|
||||||
"@polymer/polymer/lib/utils/html-tag": ["html"],
|
{ name: "svg", encapsulation: "svg" },
|
||||||
|
{ name: "css", encapsulation: "style" },
|
||||||
|
],
|
||||||
|
])
|
||||||
|
),
|
||||||
|
"@polymer/polymer/lib/utils/html-tag.js": ["html"],
|
||||||
},
|
},
|
||||||
strictCSS: true,
|
strictCSS: true,
|
||||||
htmlMinifier: module.exports.htmlMinifierOptions,
|
htmlMinifier: module.exports.htmlMinifierOptions,
|
||||||
failOnError: true, // we can turn this off in case of false positives
|
failOnError: false, // we can turn this off in case of false positives
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// Import helpers and regenerator from runtime package
|
// Import helpers and regenerator from runtime package
|
||||||
[
|
[
|
||||||
"@babel/plugin-transform-runtime",
|
"@babel/plugin-transform-runtime",
|
||||||
{ version: require("../package.json").dependencies["@babel/runtime"] },
|
{ version: dependencies["@babel/runtime"] },
|
||||||
],
|
],
|
||||||
// Support some proposals still in TC39 process
|
// Support some proposals still in TC39 process
|
||||||
["@babel/plugin-proposal-decorators", { decoratorsBeforeExport: true }],
|
["@babel/plugin-proposal-decorators", { decoratorsBeforeExport: true }],
|
||||||
@@ -143,6 +152,18 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
|
|||||||
/node_modules[\\/]webpack[\\/]buildin/,
|
/node_modules[\\/]webpack[\\/]buildin/,
|
||||||
],
|
],
|
||||||
sourceMaps: !isTestBuild,
|
sourceMaps: !isTestBuild,
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
// Use unambiguous for dependencies so that require() is correctly injected into CommonJS files
|
||||||
|
// Exclusions are needed in some cases where ES modules have no static imports or exports, such as polyfills
|
||||||
|
sourceType: "unambiguous",
|
||||||
|
include: /\/node_modules\//,
|
||||||
|
exclude: [
|
||||||
|
"element-internals-polyfill",
|
||||||
|
"@?lit(?:-labs|-element|-html)?",
|
||||||
|
].map((p) => new RegExp(`/node_modules/${p}/`)),
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const nameSuffix = (latestBuild) => (latestBuild ? "-modern" : "-legacy");
|
const nameSuffix = (latestBuild) => (latestBuild ? "-modern" : "-legacy");
|
||||||
|
@@ -30,8 +30,8 @@ gulp.task(
|
|||||||
env.useWDS()
|
env.useWDS()
|
||||||
? "wds-watch-app"
|
? "wds-watch-app"
|
||||||
: env.useRollup()
|
: env.useRollup()
|
||||||
? "rollup-watch-app"
|
? "rollup-watch-app"
|
||||||
: "webpack-watch-app"
|
: "webpack-watch-app"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -1,16 +1,26 @@
|
|||||||
// Tasks to compress
|
// Tasks to compress
|
||||||
|
|
||||||
|
import { deleteAsync } from "del";
|
||||||
import gulp from "gulp";
|
import gulp from "gulp";
|
||||||
|
import gulpIf from "gulp-if";
|
||||||
|
import vinylPaths from "vinyl-paths";
|
||||||
import zopfli from "gulp-zopfli-green";
|
import zopfli from "gulp-zopfli-green";
|
||||||
import paths from "../paths.cjs";
|
import paths from "../paths.cjs";
|
||||||
|
|
||||||
const zopfliOptions = { threshold: 150 };
|
const zopfliOptions = { threshold: 150 };
|
||||||
|
|
||||||
|
const compressedExt = /\.gz$/;
|
||||||
|
const deleteUncompressed = (p) => deleteAsync(p.replace(compressedExt, ""));
|
||||||
|
|
||||||
const compressDist = (rootDir) =>
|
const compressDist = (rootDir) =>
|
||||||
gulp
|
gulp
|
||||||
.src([`${rootDir}/**/*.{js,json,css,svg}`])
|
.src([
|
||||||
|
`${rootDir}/**/*.{js?(.map),json,css,svg,xml}`,
|
||||||
|
`${rootDir}/{authorize,onboarding}.html`,
|
||||||
|
])
|
||||||
.pipe(zopfli(zopfliOptions))
|
.pipe(zopfli(zopfliOptions))
|
||||||
.pipe(gulp.dest(rootDir));
|
.pipe(gulp.dest(rootDir))
|
||||||
|
.pipe(gulpIf(compressedExt, vinylPaths(deleteUncompressed)));
|
||||||
|
|
||||||
gulp.task("compress-app", () => compressDist(paths.app_output_root));
|
gulp.task("compress-app", () => compressDist(paths.app_output_root));
|
||||||
gulp.task("compress-hassio", () => compressDist(paths.hassio_output_root));
|
gulp.task("compress-hassio", () => compressDist(paths.hassio_output_root));
|
||||||
|
@@ -161,6 +161,10 @@ gulp.task("fetch-lokalise", async function () {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
throw err;
|
||||||
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@@ -426,6 +426,7 @@ gulp.task(
|
|||||||
"fetch-nightly-translations",
|
"fetch-nightly-translations",
|
||||||
gulp.series("clean-translations", "ensure-translations-build-dir")
|
gulp.series("clean-translations", "ensure-translations-build-dir")
|
||||||
),
|
),
|
||||||
|
gulp.parallel("create-test-metadata", "create-test-translation"),
|
||||||
"build-master-translation",
|
"build-master-translation",
|
||||||
"build-merged-translations",
|
"build-merged-translations",
|
||||||
"build-translation-fragment-supervisor",
|
"build-translation-fragment-supervisor",
|
||||||
|
@@ -115,7 +115,9 @@ gulp.task("webpack-prod-app", () =>
|
|||||||
|
|
||||||
gulp.task("webpack-dev-server-demo", () =>
|
gulp.task("webpack-dev-server-demo", () =>
|
||||||
runDevServer({
|
runDevServer({
|
||||||
compiler: webpack(bothBuilds(createDemoConfig, { isProdBuild: false })),
|
compiler: webpack(
|
||||||
|
createDemoConfig({ isProdBuild: false, latestBuild: true })
|
||||||
|
),
|
||||||
contentBase: paths.demo_output_root,
|
contentBase: paths.demo_output_root,
|
||||||
port: 8090,
|
port: 8090,
|
||||||
})
|
})
|
||||||
@@ -131,7 +133,9 @@ gulp.task("webpack-prod-demo", () =>
|
|||||||
|
|
||||||
gulp.task("webpack-dev-server-cast", () =>
|
gulp.task("webpack-dev-server-cast", () =>
|
||||||
runDevServer({
|
runDevServer({
|
||||||
compiler: webpack(bothBuilds(createCastConfig, { isProdBuild: false })),
|
compiler: webpack(
|
||||||
|
createCastConfig({ isProdBuild: false, latestBuild: true })
|
||||||
|
),
|
||||||
contentBase: paths.cast_output_root,
|
contentBase: paths.cast_output_root,
|
||||||
port: 8080,
|
port: 8080,
|
||||||
// Accessible from the network, because that's how Cast hits it.
|
// Accessible from the network, because that's how Cast hits it.
|
||||||
@@ -174,8 +178,9 @@ gulp.task("webpack-prod-hassio", () =>
|
|||||||
|
|
||||||
gulp.task("webpack-dev-server-gallery", () =>
|
gulp.task("webpack-dev-server-gallery", () =>
|
||||||
runDevServer({
|
runDevServer({
|
||||||
// We don't use the es5 build, but the dev server will fuck up the publicPath if we don't
|
compiler: webpack(
|
||||||
compiler: webpack(bothBuilds(createGalleryConfig, { isProdBuild: false })),
|
createGalleryConfig({ isProdBuild: false, latestBuild: true })
|
||||||
|
),
|
||||||
contentBase: paths.gallery_output_root,
|
contentBase: paths.gallery_output_root,
|
||||||
port: 8100,
|
port: 8100,
|
||||||
listenHost: "0.0.0.0",
|
listenHost: "0.0.0.0",
|
||||||
|
@@ -7,6 +7,9 @@ const TerserPlugin = require("terser-webpack-plugin");
|
|||||||
const { WebpackManifestPlugin } = require("webpack-manifest-plugin");
|
const { WebpackManifestPlugin } = require("webpack-manifest-plugin");
|
||||||
const log = require("fancy-log");
|
const log = require("fancy-log");
|
||||||
const WebpackBar = require("webpackbar");
|
const WebpackBar = require("webpackbar");
|
||||||
|
const {
|
||||||
|
TransformAsyncModulesPlugin,
|
||||||
|
} = require("transform-async-modules-webpack-plugin");
|
||||||
const paths = require("./paths.cjs");
|
const paths = require("./paths.cjs");
|
||||||
const bundle = require("./bundle.cjs");
|
const bundle = require("./bundle.cjs");
|
||||||
|
|
||||||
@@ -51,8 +54,8 @@ const createWebpackConfig = ({
|
|||||||
devtool: isTestBuild
|
devtool: isTestBuild
|
||||||
? false
|
? false
|
||||||
: isProdBuild
|
: isProdBuild
|
||||||
? "nosources-source-map"
|
? "nosources-source-map"
|
||||||
: "eval-cheap-module-source-map",
|
: "eval-cheap-module-source-map",
|
||||||
entry,
|
entry,
|
||||||
node: false,
|
node: false,
|
||||||
module: {
|
module: {
|
||||||
@@ -142,17 +145,6 @@ const createWebpackConfig = ({
|
|||||||
),
|
),
|
||||||
path.resolve(paths.polymer_dir, "src/util/empty.js")
|
path.resolve(paths.polymer_dir, "src/util/empty.js")
|
||||||
),
|
),
|
||||||
// See `src/resources/intl-polyfill-legacy.ts` for explanation
|
|
||||||
!latestBuild &&
|
|
||||||
new webpack.NormalModuleReplacementPlugin(
|
|
||||||
new RegExp(
|
|
||||||
path.resolve(paths.polymer_dir, "src/resources/intl-polyfill.ts")
|
|
||||||
),
|
|
||||||
path.resolve(
|
|
||||||
paths.polymer_dir,
|
|
||||||
"src/resources/intl-polyfill-legacy.ts"
|
|
||||||
)
|
|
||||||
),
|
|
||||||
!isProdBuild && new LogStartCompilePlugin(),
|
!isProdBuild && new LogStartCompilePlugin(),
|
||||||
isProdBuild &&
|
isProdBuild &&
|
||||||
new StatsWriterPlugin({
|
new StatsWriterPlugin({
|
||||||
@@ -163,6 +155,8 @@ const createWebpackConfig = ({
|
|||||||
stats: { assets: true, chunks: true, modules: true },
|
stats: { assets: true, chunks: true, modules: true },
|
||||||
transform: (stats) => JSON.stringify(filterStats(stats)),
|
transform: (stats) => JSON.stringify(filterStats(stats)),
|
||||||
}),
|
}),
|
||||||
|
!latestBuild &&
|
||||||
|
new TransformAsyncModulesPlugin({ browserslistEnv: "legacy" }),
|
||||||
].filter(Boolean),
|
].filter(Boolean),
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: [".ts", ".js", ".json"],
|
extensions: [".ts", ".js", ".json"],
|
||||||
@@ -191,11 +185,11 @@ const createWebpackConfig = ({
|
|||||||
filename: ({ chunk }) =>
|
filename: ({ chunk }) =>
|
||||||
!isProdBuild || isStatsBuild || dontHash.has(chunk.name)
|
!isProdBuild || isStatsBuild || dontHash.has(chunk.name)
|
||||||
? "[name].js"
|
? "[name].js"
|
||||||
: "[name]-[contenthash].js",
|
: "[name].[contenthash].js",
|
||||||
chunkFilename:
|
chunkFilename:
|
||||||
isProdBuild && !isStatsBuild ? "[id]-[contenthash].js" : "[name].js",
|
isProdBuild && !isStatsBuild ? "[name].[contenthash].js" : "[name].js",
|
||||||
assetModuleFilename:
|
assetModuleFilename:
|
||||||
isProdBuild && !isStatsBuild ? "[id]-[contenthash][ext]" : "[id][ext]",
|
isProdBuild && !isStatsBuild ? "[id].[contenthash][ext]" : "[id][ext]",
|
||||||
crossOriginLoading: "use-credentials",
|
crossOriginLoading: "use-credentials",
|
||||||
hashFunction: "xxhash64",
|
hashFunction: "xxhash64",
|
||||||
hashDigest: "base64url",
|
hashDigest: "base64url",
|
||||||
|
BIN
cast/public/images/nabu-loves-hass.png
Normal file
BIN
cast/public/images/nabu-loves-hass.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.8 KiB |
@@ -31,11 +31,11 @@ import "./hc-layout";
|
|||||||
|
|
||||||
@customElement("hc-cast")
|
@customElement("hc-cast")
|
||||||
class HcCast extends LitElement {
|
class HcCast extends LitElement {
|
||||||
@property() public auth!: Auth;
|
@property({ attribute: false }) public auth!: Auth;
|
||||||
|
|
||||||
@property() public connection!: Connection;
|
@property({ attribute: false }) public connection!: Connection;
|
||||||
|
|
||||||
@property() public castManager!: CastManager;
|
@property({ attribute: false }) public castManager!: CastManager;
|
||||||
|
|
||||||
@state() private askWrite = false;
|
@state() private askWrite = false;
|
||||||
|
|
||||||
@@ -73,44 +73,44 @@ class HcCast extends LitElement {
|
|||||||
${error
|
${error
|
||||||
? html` <div class="card-content">${error}</div> `
|
? html` <div class="card-content">${error}</div> `
|
||||||
: !this.castManager.status
|
: !this.castManager.status
|
||||||
? html`
|
? html`
|
||||||
<p class="center-item">
|
<p class="center-item">
|
||||||
<mwc-button raised @click=${this._handleLaunch}>
|
<mwc-button raised @click=${this._handleLaunch}>
|
||||||
<ha-svg-icon .path=${mdiCast}></ha-svg-icon>
|
<ha-svg-icon .path=${mdiCast}></ha-svg-icon>
|
||||||
Start Casting
|
Start Casting
|
||||||
</mwc-button>
|
</mwc-button>
|
||||||
</p>
|
</p>
|
||||||
`
|
`
|
||||||
: html`
|
: html`
|
||||||
<div class="section-header">PICK A VIEW</div>
|
<div class="section-header">PICK A VIEW</div>
|
||||||
<paper-listbox
|
<paper-listbox
|
||||||
attr-for-selected="data-path"
|
attr-for-selected="data-path"
|
||||||
.selected=${this.castManager.status.lovelacePath || ""}
|
.selected=${this.castManager.status.lovelacePath || ""}
|
||||||
>
|
>
|
||||||
${(
|
${(
|
||||||
this.lovelaceViews ?? [
|
this.lovelaceViews ?? [
|
||||||
generateDefaultViewConfig({}, {}, {}, {}, () => ""),
|
generateDefaultViewConfig({}, {}, {}, {}, () => ""),
|
||||||
]
|
]
|
||||||
).map(
|
).map(
|
||||||
(view, idx) => html`
|
(view, idx) => html`
|
||||||
<paper-icon-item
|
<paper-icon-item
|
||||||
@click=${this._handlePickView}
|
@click=${this._handlePickView}
|
||||||
data-path=${view.path || idx}
|
data-path=${view.path || idx}
|
||||||
>
|
>
|
||||||
${view.icon
|
${view.icon
|
||||||
? html`
|
? html`
|
||||||
<ha-icon
|
<ha-icon
|
||||||
.icon=${view.icon}
|
.icon=${view.icon}
|
||||||
slot="item-icon"
|
slot="item-icon"
|
||||||
></ha-icon>
|
></ha-icon>
|
||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
${view.title || view.path}
|
${view.title || view.path}
|
||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
`
|
`
|
||||||
)}
|
)}
|
||||||
</paper-listbox>
|
</paper-listbox>
|
||||||
`}
|
`}
|
||||||
<div class="card-actions">
|
<div class="card-actions">
|
||||||
${this.castManager.status
|
${this.castManager.status
|
||||||
? html`
|
? html`
|
||||||
@@ -241,6 +241,8 @@ class HcCast extends LitElement {
|
|||||||
|
|
||||||
mwc-button ha-svg-icon {
|
mwc-button ha-svg-icon {
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
|
margin-inline-end: 8px;
|
||||||
|
margin-inline-start: initial;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
import "@material/mwc-button";
|
import "@material/mwc-button";
|
||||||
import { mdiCastConnected, mdiCast } from "@mdi/js";
|
import { mdiCastConnected, mdiCast } from "@mdi/js";
|
||||||
import "@polymer/paper-input/paper-input";
|
|
||||||
import {
|
import {
|
||||||
Auth,
|
Auth,
|
||||||
Connection,
|
Connection,
|
||||||
@@ -24,6 +23,7 @@ import "../../../../src/components/ha-svg-icon";
|
|||||||
import "../../../../src/layouts/hass-loading-screen";
|
import "../../../../src/layouts/hass-loading-screen";
|
||||||
import { registerServiceWorker } from "../../../../src/util/register-service-worker";
|
import { registerServiceWorker } from "../../../../src/util/register-service-worker";
|
||||||
import "./hc-layout";
|
import "./hc-layout";
|
||||||
|
import "../../../../src/components/ha-textfield";
|
||||||
|
|
||||||
const seeFAQ = (qid) => html`
|
const seeFAQ = (qid) => html`
|
||||||
See <a href="./faq.html${qid ? `#${qid}` : ""}">the FAQ</a> for more
|
See <a href="./faq.html${qid ? `#${qid}` : ""}">the FAQ</a> for more
|
||||||
@@ -33,13 +33,13 @@ const translateErr = (err) =>
|
|||||||
err === ERR_CANNOT_CONNECT
|
err === ERR_CANNOT_CONNECT
|
||||||
? "Unable to connect"
|
? "Unable to connect"
|
||||||
: err === ERR_HASS_HOST_REQUIRED
|
: err === ERR_HASS_HOST_REQUIRED
|
||||||
? "Please enter a Home Assistant URL."
|
? "Please enter a Home Assistant URL."
|
||||||
: err === ERR_INVALID_HTTPS_TO_HTTP
|
: err === ERR_INVALID_HTTPS_TO_HTTP
|
||||||
? html`
|
? html`
|
||||||
Cannot connect to Home Assistant instances over "http://".
|
Cannot connect to Home Assistant instances over "http://".
|
||||||
${seeFAQ("https")}
|
${seeFAQ("https")}
|
||||||
`
|
`
|
||||||
: `Unknown error (${err}).`;
|
: `Unknown error (${err}).`;
|
||||||
|
|
||||||
const INTRO = html`
|
const INTRO = html`
|
||||||
<p>
|
<p>
|
||||||
@@ -116,13 +116,11 @@ export class HcConnect extends LitElement {
|
|||||||
To get started, enter your Home Assistant URL and click authorize.
|
To get started, enter your Home Assistant URL and click authorize.
|
||||||
If you want a preview instead, click the show demo button.
|
If you want a preview instead, click the show demo button.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<ha-textfield
|
||||||
<paper-input
|
label="Home Assistant URL"
|
||||||
label="Home Assistant URL"
|
placeholder="https://abcdefghijklmnop.ui.nabu.casa"
|
||||||
placeholder="https://abcdefghijklmnop.ui.nabu.casa"
|
@keydown=${this._handleInputKeyDown}
|
||||||
@keydown=${this._handleInputKeyDown}
|
></ha-textfield>
|
||||||
></paper-input>
|
|
||||||
</p>
|
|
||||||
${this.error ? html` <p class="error">${this.error}</p> ` : ""}
|
${this.error ? html` <p class="error">${this.error}</p> ` : ""}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-actions">
|
<div class="card-actions">
|
||||||
@@ -196,7 +194,7 @@ export class HcConnect extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async _handleConnect() {
|
private async _handleConnect() {
|
||||||
const inputEl = this.shadowRoot!.querySelector("paper-input")!;
|
const inputEl = this.shadowRoot!.querySelector("ha-textfield")!;
|
||||||
const value = inputEl.value || "";
|
const value = inputEl.value || "";
|
||||||
this.error = undefined;
|
this.error = undefined;
|
||||||
|
|
||||||
@@ -315,6 +313,10 @@ export class HcConnect extends LitElement {
|
|||||||
.spacer {
|
.spacer {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ha-textfield {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -10,13 +10,13 @@ import "../../../../src/components/ha-card";
|
|||||||
|
|
||||||
@customElement("hc-layout")
|
@customElement("hc-layout")
|
||||||
class HcLayout extends LitElement {
|
class HcLayout extends LitElement {
|
||||||
@property() public subtitle?: string | undefined;
|
@property() public subtitle?: string;
|
||||||
|
|
||||||
@property() public auth?: Auth;
|
@property({ attribute: false }) public auth?: Auth;
|
||||||
|
|
||||||
@property() public connection?: Connection;
|
@property({ attribute: false }) public connection?: Connection;
|
||||||
|
|
||||||
@property() public user?: HassUser;
|
@property({ attribute: false }) public user?: HassUser;
|
||||||
|
|
||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
|
@@ -12,8 +12,8 @@ class HcLaunchScreen extends LitElement {
|
|||||||
return html`
|
return html`
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<img
|
<img
|
||||||
alt="Home Assistant logo on left, Nabu Casa logo on right, and red heart in center"
|
alt="Nabu Casa logo on left, Home Assistant logo on right, and red heart in center"
|
||||||
src="https://www.home-assistant.io/images/blog/2018-09-thinking-big/social.png"
|
src="https://cast.home-assistant.io/images/nabu-loves-hass.png"
|
||||||
/>
|
/>
|
||||||
<div class="status">
|
<div class="status">
|
||||||
${this.hass ? "Connected" : "Not Connected"}
|
${this.hass ? "Connected" : "Not Connected"}
|
||||||
@@ -28,7 +28,6 @@ class HcLaunchScreen extends LitElement {
|
|||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
padding-top: 64px;
|
|
||||||
background-color: white;
|
background-color: white;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
@@ -36,15 +35,13 @@ class HcLaunchScreen extends LitElement {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
justify-content: space-evenly;
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
width: 717px;
|
max-width: 80%;
|
||||||
height: 376px;
|
object-fit: cover;
|
||||||
display: block;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
.status {
|
|
||||||
padding-right: 54px;
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
@@ -17,7 +17,7 @@ class HcLovelace extends LitElement {
|
|||||||
@property({ attribute: false })
|
@property({ attribute: false })
|
||||||
public lovelaceConfig!: LovelaceConfig;
|
public lovelaceConfig!: LovelaceConfig;
|
||||||
|
|
||||||
@property() public viewPath?: string | number;
|
@property() public viewPath?: string | number | null;
|
||||||
|
|
||||||
@property() public urlPath: string | null = null;
|
@property() public urlPath: string | null = null;
|
||||||
|
|
||||||
@@ -93,6 +93,9 @@ class HcLovelace extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private get _viewIndex() {
|
private get _viewIndex() {
|
||||||
|
if (this.viewPath === null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
const selectedView = this.viewPath;
|
const selectedView = this.viewPath;
|
||||||
const selectedViewInt = parseInt(selectedView as string, 10);
|
const selectedViewInt = parseInt(selectedView as string, 10);
|
||||||
for (let i = 0; i < this.lovelaceConfig.views.length; i++) {
|
for (let i = 0; i < this.lovelaceConfig.views.length; i++) {
|
||||||
|
@@ -51,10 +51,10 @@ export class HcMain extends HassElement {
|
|||||||
|
|
||||||
@state() private _lovelacePath: string | number | null = null;
|
@state() private _lovelacePath: string | number | null = null;
|
||||||
|
|
||||||
@state() private _error?: string;
|
|
||||||
|
|
||||||
@state() private _urlPath?: string | null;
|
@state() private _urlPath?: string | null;
|
||||||
|
|
||||||
|
@state() private _error?: string;
|
||||||
|
|
||||||
private _hassUUID?: string;
|
private _hassUUID?: string;
|
||||||
|
|
||||||
private _unsubLovelace?: UnsubscribeFunc;
|
private _unsubLovelace?: UnsubscribeFunc;
|
||||||
@@ -81,7 +81,7 @@ export class HcMain extends HassElement {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
!this._lovelaceConfig ||
|
!this._lovelaceConfig ||
|
||||||
this._lovelacePath === null ||
|
this._urlPath === undefined ||
|
||||||
// Guard against part of HA not being loaded yet.
|
// Guard against part of HA not being loaded yet.
|
||||||
!this.hass ||
|
!this.hass ||
|
||||||
!this.hass.states ||
|
!this.hass.states ||
|
||||||
@@ -99,8 +99,8 @@ export class HcMain extends HassElement {
|
|||||||
<hc-lovelace
|
<hc-lovelace
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.lovelaceConfig=${this._lovelaceConfig}
|
.lovelaceConfig=${this._lovelaceConfig}
|
||||||
.viewPath=${this._lovelacePath}
|
|
||||||
.urlPath=${this._urlPath}
|
.urlPath=${this._urlPath}
|
||||||
|
.viewPath=${this._lovelacePath}
|
||||||
@config-refresh=${this._generateDefaultLovelaceConfig}
|
@config-refresh=${this._generateDefaultLovelaceConfig}
|
||||||
></hc-lovelace>
|
></hc-lovelace>
|
||||||
`;
|
`;
|
||||||
@@ -205,7 +205,6 @@ export class HcMain extends HassElement {
|
|||||||
expires_in: 0,
|
expires_in: 0,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
this._hassUUID = msg.hassUUID;
|
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
const errorMessage = this._getErrorMessage(err);
|
const errorMessage = this._getErrorMessage(err);
|
||||||
this._error = errorMessage;
|
this._error = errorMessage;
|
||||||
@@ -225,6 +224,17 @@ export class HcMain extends HassElement {
|
|||||||
this.hass.connection.close();
|
this.hass.connection.close();
|
||||||
}
|
}
|
||||||
this.initializeHass(auth, connection);
|
this.initializeHass(auth, connection);
|
||||||
|
if (this._hassUUID !== msg.hassUUID) {
|
||||||
|
this._hassUUID = msg.hassUUID;
|
||||||
|
this._lovelaceConfig = undefined;
|
||||||
|
this._urlPath = undefined;
|
||||||
|
this._lovelacePath = null;
|
||||||
|
if (this._unsubLovelace) {
|
||||||
|
this._unsubLovelace();
|
||||||
|
this._unsubLovelace = undefined;
|
||||||
|
}
|
||||||
|
resourcesLoaded = false;
|
||||||
|
}
|
||||||
this._error = undefined;
|
this._error = undefined;
|
||||||
this._sendStatus();
|
this._sendStatus();
|
||||||
}
|
}
|
||||||
@@ -233,7 +243,7 @@ export class HcMain extends HassElement {
|
|||||||
this._showDemo = false;
|
this._showDemo = false;
|
||||||
// We should not get this command before we are connected.
|
// We should not get this command before we are connected.
|
||||||
// Means a client got out of sync. Let's send status to them.
|
// Means a client got out of sync. Let's send status to them.
|
||||||
if (!this.hass) {
|
if (!this.hass?.connected) {
|
||||||
this._sendStatus(msg.senderId!);
|
this._sendStatus(msg.senderId!);
|
||||||
this._error = "Cannot show Lovelace because we're not connected.";
|
this._error = "Cannot show Lovelace because we're not connected.";
|
||||||
this._sendError(
|
this._sendError(
|
||||||
@@ -275,7 +285,7 @@ export class HcMain extends HassElement {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
this._urlPath = "energy";
|
this._urlPath = "energy";
|
||||||
this._lovelacePath = 0;
|
this._lovelacePath = null;
|
||||||
this._sendStatus();
|
this._sendStatus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -284,6 +294,7 @@ export class HcMain extends HassElement {
|
|||||||
this._lovelaceConfig = undefined;
|
this._lovelaceConfig = undefined;
|
||||||
if (this._unsubLovelace) {
|
if (this._unsubLovelace) {
|
||||||
this._unsubLovelace();
|
this._unsubLovelace();
|
||||||
|
this._unsubLovelace = undefined;
|
||||||
}
|
}
|
||||||
const llColl = atLeastVersion(this.hass.connection.haVersion, 0, 107)
|
const llColl = atLeastVersion(this.hass.connection.haVersion, 0, 107)
|
||||||
? getLovelaceCollection(this.hass.connection, msg.urlPath)
|
? getLovelaceCollection(this.hass.connection, msg.urlPath)
|
||||||
|
@@ -39,7 +39,9 @@ export class HADemoCard extends LitElement implements LovelaceCard {
|
|||||||
<div class="picker">
|
<div class="picker">
|
||||||
<div class="label">
|
<div class="label">
|
||||||
${this._switching
|
${this._switching
|
||||||
? html`<ha-circular-progress active></ha-circular-progress>`
|
? html`<ha-circular-progress
|
||||||
|
indeterminate
|
||||||
|
></ha-circular-progress>`
|
||||||
: until(
|
: until(
|
||||||
selectedDemoConfig.then(
|
selectedDemoConfig.then(
|
||||||
(conf) => html`
|
(conf) => html`
|
||||||
@@ -48,8 +50,7 @@ export class HADemoCard extends LitElement implements LovelaceCard {
|
|||||||
<a target="_blank" href=${conf.authorUrl}>
|
<a target="_blank" href=${conf.authorUrl}>
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.page-demo.cards.demo.demo_by",
|
"ui.panel.page-demo.cards.demo.demo_by",
|
||||||
"name",
|
{ name: conf.authorName }
|
||||||
conf.authorName
|
|
||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
</small>
|
</small>
|
||||||
|
@@ -17,12 +17,14 @@ import { energyEntities } from "./stubs/entities";
|
|||||||
import { mockEntityRegistry } from "./stubs/entity_registry";
|
import { mockEntityRegistry } from "./stubs/entity_registry";
|
||||||
import { mockEvents } from "./stubs/events";
|
import { mockEvents } from "./stubs/events";
|
||||||
import { mockFrontend } from "./stubs/frontend";
|
import { mockFrontend } from "./stubs/frontend";
|
||||||
|
import { mockIcons } from "./stubs/icons";
|
||||||
import { mockHistory } from "./stubs/history";
|
import { mockHistory } from "./stubs/history";
|
||||||
import { mockLovelace } from "./stubs/lovelace";
|
import { mockLovelace } from "./stubs/lovelace";
|
||||||
import { mockMediaPlayer } from "./stubs/media_player";
|
import { mockMediaPlayer } from "./stubs/media_player";
|
||||||
import { mockPersistentNotification } from "./stubs/persistent_notification";
|
import { mockPersistentNotification } from "./stubs/persistent_notification";
|
||||||
import { mockRecorder } from "./stubs/recorder";
|
import { mockRecorder } from "./stubs/recorder";
|
||||||
import { mockTodo } from "./stubs/todo";
|
import { mockTodo } from "./stubs/todo";
|
||||||
|
import { mockSensor } from "./stubs/sensor";
|
||||||
import { mockSystemLog } from "./stubs/system_log";
|
import { mockSystemLog } from "./stubs/system_log";
|
||||||
import { mockTemplate } from "./stubs/template";
|
import { mockTemplate } from "./stubs/template";
|
||||||
import { mockTranslations } from "./stubs/translations";
|
import { mockTranslations } from "./stubs/translations";
|
||||||
@@ -50,11 +52,13 @@ export class HaDemo extends HomeAssistantAppEl {
|
|||||||
mockHistory(hass);
|
mockHistory(hass);
|
||||||
mockRecorder(hass);
|
mockRecorder(hass);
|
||||||
mockTodo(hass);
|
mockTodo(hass);
|
||||||
|
mockSensor(hass);
|
||||||
mockSystemLog(hass);
|
mockSystemLog(hass);
|
||||||
mockTemplate(hass);
|
mockTemplate(hass);
|
||||||
mockEvents(hass);
|
mockEvents(hass);
|
||||||
mockMediaPlayer(hass);
|
mockMediaPlayer(hass);
|
||||||
mockFrontend(hass);
|
mockFrontend(hass);
|
||||||
|
mockIcons(hass);
|
||||||
mockEnergy(hass);
|
mockEnergy(hass);
|
||||||
mockPersistentNotification(hass);
|
mockPersistentNotification(hass);
|
||||||
mockConfigEntries(hass);
|
mockConfigEntries(hass);
|
||||||
|
33
demo/src/stubs/icons.ts
Normal file
33
demo/src/stubs/icons.ts
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import { IconCategory } from "../../../src/data/icons";
|
||||||
|
import { ENTITY_COMPONENT_ICONS } from "../../../src/fake_data/entity_component_icons";
|
||||||
|
import { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
|
||||||
|
|
||||||
|
export const mockIcons = (hass: MockHomeAssistant) => {
|
||||||
|
hass.mockWS(
|
||||||
|
"frontend/get_icons",
|
||||||
|
async ({
|
||||||
|
category,
|
||||||
|
integration,
|
||||||
|
}: {
|
||||||
|
category: IconCategory;
|
||||||
|
integration?: string;
|
||||||
|
}) => {
|
||||||
|
if (integration) {
|
||||||
|
try {
|
||||||
|
const response = await fetch(
|
||||||
|
`https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/components/${integration}/icons.json`
|
||||||
|
).then((resp) => resp.json());
|
||||||
|
return { resources: { [integration]: response[category] || {} } };
|
||||||
|
} catch {
|
||||||
|
return { resources: {} };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (category === "entity_component") {
|
||||||
|
return {
|
||||||
|
resources: ENTITY_COMPONENT_ICONS,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { resources: {} };
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
@@ -43,8 +43,8 @@ const generateMeanStatistics = (
|
|||||||
period === "day"
|
period === "day"
|
||||||
? addDays(currentDate, 1)
|
? addDays(currentDate, 1)
|
||||||
: period === "month"
|
: period === "month"
|
||||||
? addMonths(currentDate, 1)
|
? addMonths(currentDate, 1)
|
||||||
: addHours(currentDate, 1);
|
: addHours(currentDate, 1);
|
||||||
}
|
}
|
||||||
return statistics;
|
return statistics;
|
||||||
};
|
};
|
||||||
@@ -80,8 +80,8 @@ const generateSumStatistics = (
|
|||||||
period === "day"
|
period === "day"
|
||||||
? addDays(currentDate, 1)
|
? addDays(currentDate, 1)
|
||||||
: period === "month"
|
: period === "month"
|
||||||
? addMonths(currentDate, 1)
|
? addMonths(currentDate, 1)
|
||||||
: addHours(currentDate, 1);
|
: addHours(currentDate, 1);
|
||||||
}
|
}
|
||||||
return statistics;
|
return statistics;
|
||||||
};
|
};
|
||||||
|
58
demo/src/stubs/sensor.ts
Normal file
58
demo/src/stubs/sensor.ts
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
import { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
|
||||||
|
|
||||||
|
export const mockSensor = (hass: MockHomeAssistant) => {
|
||||||
|
hass.mockWS("sensor/numeric_device_classes", () => [
|
||||||
|
{
|
||||||
|
numeric_device_classes: [
|
||||||
|
"volume_storage",
|
||||||
|
"gas",
|
||||||
|
"data_size",
|
||||||
|
"irradiance",
|
||||||
|
"wind_speed",
|
||||||
|
"volatile_organic_compounds",
|
||||||
|
"volatile_organic_compounds_parts",
|
||||||
|
"voltage",
|
||||||
|
"frequency",
|
||||||
|
"precipitation_intensity",
|
||||||
|
"volume",
|
||||||
|
"precipitation",
|
||||||
|
"battery",
|
||||||
|
"nitrogen_dioxide",
|
||||||
|
"speed",
|
||||||
|
"signal_strength",
|
||||||
|
"pm1",
|
||||||
|
"nitrous_oxide",
|
||||||
|
"atmospheric_pressure",
|
||||||
|
"data_rate",
|
||||||
|
"temperature",
|
||||||
|
"power_factor",
|
||||||
|
"aqi",
|
||||||
|
"current",
|
||||||
|
"volume_flow_rate",
|
||||||
|
"humidity",
|
||||||
|
"duration",
|
||||||
|
"ozone",
|
||||||
|
"distance",
|
||||||
|
"pressure",
|
||||||
|
"pm25",
|
||||||
|
"weight",
|
||||||
|
"energy",
|
||||||
|
"carbon_monoxide",
|
||||||
|
"apparent_power",
|
||||||
|
"illuminance",
|
||||||
|
"energy_storage",
|
||||||
|
"moisture",
|
||||||
|
"power",
|
||||||
|
"water",
|
||||||
|
"carbon_dioxide",
|
||||||
|
"ph",
|
||||||
|
"reactive_power",
|
||||||
|
"monetary",
|
||||||
|
"nitrogen_monoxide",
|
||||||
|
"pm10",
|
||||||
|
"sound_pressure",
|
||||||
|
"sulphur_dioxide",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
};
|
@@ -21,4 +21,5 @@ export const mockTodo = (hass: MockHomeAssistant) => {
|
|||||||
},
|
},
|
||||||
] as TodoItem[],
|
] as TodoItem[],
|
||||||
}));
|
}));
|
||||||
|
hass.mockWS("todo/item/subscribe", (_msg, _hass) => () => {});
|
||||||
};
|
};
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Button } from "@material/mwc-button";
|
import { Button } from "@material/mwc-button";
|
||||||
import { html, LitElement, css, TemplateResult } from "lit";
|
import { html, LitElement, css, TemplateResult, nothing } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import { applyThemesOnElement } from "../../../src/common/dom/apply_themes_on_element";
|
import { applyThemesOnElement } from "../../../src/common/dom/apply_themes_on_element";
|
||||||
import { fireEvent } from "../../../src/common/dom/fire_event";
|
import { fireEvent } from "../../../src/common/dom/fire_event";
|
||||||
@@ -9,9 +9,9 @@ import "../../../src/components/ha-card";
|
|||||||
class DemoBlackWhiteRow extends LitElement {
|
class DemoBlackWhiteRow extends LitElement {
|
||||||
@property() title!: string;
|
@property() title!: string;
|
||||||
|
|
||||||
@property() value!: any;
|
@property() value?: any;
|
||||||
|
|
||||||
@property() disabled = false;
|
@property({ type: Boolean }) public disabled = false;
|
||||||
|
|
||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
@@ -45,7 +45,9 @@ class DemoBlackWhiteRow extends LitElement {
|
|||||||
</mwc-button>
|
</mwc-button>
|
||||||
</div>
|
</div>
|
||||||
</ha-card>
|
</ha-card>
|
||||||
<pre>${JSON.stringify(this.value, undefined, 2)}</pre>
|
${this.value
|
||||||
|
? html`<pre>${JSON.stringify(this.value, undefined, 2)}</pre>`
|
||||||
|
: nothing}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
@@ -11,11 +11,11 @@ export interface DemoCardConfig {
|
|||||||
|
|
||||||
@customElement("demo-card")
|
@customElement("demo-card")
|
||||||
class DemoCard extends LitElement {
|
class DemoCard extends LitElement {
|
||||||
@property() public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
|
|
||||||
@property() public config!: DemoCardConfig;
|
@property({ attribute: false }) public config!: DemoCardConfig;
|
||||||
|
|
||||||
@property() public showConfig = false;
|
@property({ type: Boolean }) public showConfig = false;
|
||||||
|
|
||||||
@state() private _size?: number;
|
@state() private _size?: number;
|
||||||
|
|
||||||
|
@@ -10,9 +10,9 @@ import "../ha-demo-options";
|
|||||||
|
|
||||||
@customElement("demo-cards")
|
@customElement("demo-cards")
|
||||||
class DemoCards extends LitElement {
|
class DemoCards extends LitElement {
|
||||||
@property() public configs!: DemoCardConfig[];
|
@property({ attribute: false }) public configs!: DemoCardConfig[];
|
||||||
|
|
||||||
@property() public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
|
|
||||||
@state() private _showConfig = false;
|
@state() private _showConfig = false;
|
||||||
|
|
||||||
|
@@ -8,11 +8,11 @@ import { HomeAssistant } from "../../../src/types";
|
|||||||
|
|
||||||
@customElement("demo-more-info")
|
@customElement("demo-more-info")
|
||||||
class DemoMoreInfo extends LitElement {
|
class DemoMoreInfo extends LitElement {
|
||||||
@property() public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
|
|
||||||
@property() public entityId!: string;
|
@property() public entityId!: string;
|
||||||
|
|
||||||
@property() public showConfig!: boolean;
|
@property({ type: Boolean }) public showConfig = false;
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const state = this._getState(this.entityId, this.hass.states);
|
const state = this._getState(this.entityId, this.hass.states);
|
||||||
@@ -23,7 +23,7 @@ class DemoMoreInfo extends LitElement {
|
|||||||
<state-card-content
|
<state-card-content
|
||||||
.stateObj=${state}
|
.stateObj=${state}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
in-dialog
|
inDialog
|
||||||
></state-card-content>
|
></state-card-content>
|
||||||
|
|
||||||
<more-info-content
|
<more-info-content
|
||||||
|
@@ -1,19 +1,19 @@
|
|||||||
import { LitElement, css, html } from "lit";
|
import { LitElement, css, html } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import { applyThemesOnElement } from "../../../src/common/dom/apply_themes_on_element";
|
import { applyThemesOnElement } from "../../../src/common/dom/apply_themes_on_element";
|
||||||
import "../../../src/components/ha-formfield";
|
import "../../../src/components/ha-formfield";
|
||||||
import "../../../src/components/ha-switch";
|
import "../../../src/components/ha-switch";
|
||||||
import "./demo-more-info";
|
|
||||||
import "../ha-demo-options";
|
|
||||||
import { HomeAssistant } from "../../../src/types";
|
import { HomeAssistant } from "../../../src/types";
|
||||||
|
import "../ha-demo-options";
|
||||||
|
import "./demo-more-info";
|
||||||
|
|
||||||
@customElement("demo-more-infos")
|
@customElement("demo-more-infos")
|
||||||
class DemoMoreInfos extends LitElement {
|
class DemoMoreInfos extends LitElement {
|
||||||
@property() public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
|
|
||||||
@property() public entities!: [];
|
@property({ type: Array }) public entities!: string[];
|
||||||
|
|
||||||
@property({ attribute: false }) _showConfig: boolean = false;
|
@state() private _showConfig = false;
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return html`
|
return html`
|
||||||
|
@@ -509,7 +509,7 @@ export default {
|
|||||||
away_mode: "on",
|
away_mode: "on",
|
||||||
aux_heat: "off",
|
aux_heat: "off",
|
||||||
unit_of_measurement: "°C",
|
unit_of_measurement: "°C",
|
||||||
friendly_name: "Hvac",
|
friendly_name: "HVAC",
|
||||||
supported_features: 3833,
|
supported_features: 3833,
|
||||||
},
|
},
|
||||||
last_changed: "2018-07-19T10:44:46.200650+00:00",
|
last_changed: "2018-07-19T10:44:46.200650+00:00",
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
import { mdiMenu } from "@mdi/js";
|
|
||||||
import "@material/mwc-drawer";
|
import "@material/mwc-drawer";
|
||||||
import "@material/mwc-top-app-bar-fixed";
|
import "@material/mwc-top-app-bar-fixed";
|
||||||
import { html, css, LitElement, PropertyValues } from "lit";
|
import { mdiMenu } from "@mdi/js";
|
||||||
import { customElement, property, query } from "lit/decorators";
|
import { LitElement, PropertyValues, css, html } from "lit";
|
||||||
|
import { customElement, query, state } from "lit/decorators";
|
||||||
|
import { dynamicElement } from "../../src/common/dom/dynamic-element-directive";
|
||||||
|
import { HaExpansionPanel } from "../../src/components/ha-expansion-panel";
|
||||||
import "../../src/components/ha-icon-button";
|
import "../../src/components/ha-icon-button";
|
||||||
import "../../src/managers/notification-manager";
|
import "../../src/managers/notification-manager";
|
||||||
import { HaExpansionPanel } from "../../src/components/ha-expansion-panel";
|
|
||||||
import { haStyle } from "../../src/resources/styles";
|
import { haStyle } from "../../src/resources/styles";
|
||||||
import { PAGES, SIDEBAR } from "../build/import-pages";
|
import { PAGES, SIDEBAR } from "../build/import-pages";
|
||||||
import { dynamicElement } from "../../src/common/dom/dynamic-element-directive";
|
|
||||||
import "./components/page-description";
|
import "./components/page-description";
|
||||||
|
|
||||||
const GITHUB_DEMO_URL =
|
const GITHUB_DEMO_URL =
|
||||||
@@ -24,7 +24,7 @@ const FAKE_HASS = {
|
|||||||
|
|
||||||
@customElement("ha-gallery")
|
@customElement("ha-gallery")
|
||||||
class HaGallery extends LitElement {
|
class HaGallery extends LitElement {
|
||||||
@property() private _page =
|
@state() private _page =
|
||||||
document.location.hash.substring(1) ||
|
document.location.hash.substring(1) ||
|
||||||
`${SIDEBAR[0].category}/${SIDEBAR[0].pages![0]}`;
|
`${SIDEBAR[0].category}/${SIDEBAR[0].pages![0]}`;
|
||||||
|
|
||||||
|
@@ -80,7 +80,7 @@ const SCHEMAS: { name: string; conditions: ConditionWithShorthand[] }[] = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
@customElement("demo-automation-editor-condition")
|
@customElement("demo-automation-editor-condition")
|
||||||
class DemoHaAutomationEditorCondition extends LitElement {
|
export class DemoAutomationEditorCondition extends LitElement {
|
||||||
@state() private hass!: HomeAssistant;
|
@state() private hass!: HomeAssistant;
|
||||||
|
|
||||||
@state() private _disabled = false;
|
@state() private _disabled = false;
|
||||||
@@ -155,6 +155,6 @@ class DemoHaAutomationEditorCondition extends LitElement {
|
|||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
"demo-ha-automation-editor-condition": DemoHaAutomationEditorCondition;
|
"demo-automation-editor-condition": DemoAutomationEditorCondition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -126,7 +126,7 @@ const SCHEMAS: { name: string; triggers: Trigger[] }[] = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
@customElement("demo-automation-editor-trigger")
|
@customElement("demo-automation-editor-trigger")
|
||||||
class DemoHaAutomationEditorTrigger extends LitElement {
|
export class DemoAutomationEditorTrigger extends LitElement {
|
||||||
@state() private hass!: HomeAssistant;
|
@state() private hass!: HomeAssistant;
|
||||||
|
|
||||||
@state() private _disabled = false;
|
@state() private _disabled = false;
|
||||||
@@ -201,6 +201,6 @@ class DemoHaAutomationEditorTrigger extends LitElement {
|
|||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
"demo-ha-automation-editor-trigger": DemoHaAutomationEditorTrigger;
|
"demo-automation-editor-trigger": DemoAutomationEditorTrigger;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
import { css, html, LitElement, nothing } from "lit";
|
import { css, html, LitElement, nothing } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import "../../../../src/components/ha-card";
|
import "../../../../src/components/ha-card";
|
||||||
import "../../../../src/components/trace/hat-script-graph";
|
|
||||||
import "../../../../src/components/trace/hat-trace-timeline";
|
import "../../../../src/components/trace/hat-trace-timeline";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import { HomeAssistant } from "../../../../src/types";
|
import { HomeAssistant } from "../../../../src/types";
|
||||||
|
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
title: Circular Progress
|
||||||
|
subtitle: Can be used to indicate an ongoing task.
|
||||||
|
---
|
64
gallery/src/pages/components/ha-circular-progress.ts
Normal file
64
gallery/src/pages/components/ha-circular-progress.ts
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
import { html, css, LitElement, TemplateResult } from "lit";
|
||||||
|
import { customElement, property } from "lit/decorators";
|
||||||
|
import "../../../../src/components/ha-bar";
|
||||||
|
import "../../../../src/components/ha-card";
|
||||||
|
import "../../../../src/components/ha-circular-progress";
|
||||||
|
import "@material/web/progress/circular-progress";
|
||||||
|
import { HomeAssistant } from "../../../../src/types";
|
||||||
|
|
||||||
|
@customElement("demo-components-ha-circular-progress")
|
||||||
|
export class DemoHaCircularProgress extends LitElement {
|
||||||
|
@property({ attribute: false }) hass!: HomeAssistant;
|
||||||
|
|
||||||
|
protected render(): TemplateResult {
|
||||||
|
return html`<ha-card header="Basic circular progress">
|
||||||
|
<div class="card-content">
|
||||||
|
<ha-circular-progress indeterminate></ha-circular-progress></div
|
||||||
|
></ha-card>
|
||||||
|
<ha-card header="Different circular progress sizes">
|
||||||
|
<div class="card-content">
|
||||||
|
<ha-circular-progress
|
||||||
|
indeterminate
|
||||||
|
size="tiny"
|
||||||
|
></ha-circular-progress>
|
||||||
|
<ha-circular-progress
|
||||||
|
indeterminate
|
||||||
|
size="small"
|
||||||
|
></ha-circular-progress>
|
||||||
|
<ha-circular-progress
|
||||||
|
indeterminate
|
||||||
|
size="medium"
|
||||||
|
></ha-circular-progress>
|
||||||
|
<ha-circular-progress
|
||||||
|
indeterminate
|
||||||
|
size="large"
|
||||||
|
></ha-circular-progress></div
|
||||||
|
></ha-card>
|
||||||
|
<ha-card header="Circular progress with an aria-label">
|
||||||
|
<div class="card-content">
|
||||||
|
<ha-circular-progress
|
||||||
|
indeterminate
|
||||||
|
aria-label="Doing something..."
|
||||||
|
></ha-circular-progress>
|
||||||
|
<ha-circular-progress
|
||||||
|
indeterminate
|
||||||
|
.ariaLabel=${"Doing something..."}
|
||||||
|
></ha-circular-progress></div
|
||||||
|
></ha-card>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
static get styles() {
|
||||||
|
return css`
|
||||||
|
ha-card {
|
||||||
|
max-width: 600px;
|
||||||
|
margin: 24px auto;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
"demo-components-ha-circular-progress": DemoHaCircularProgress;
|
||||||
|
}
|
||||||
|
}
|
@@ -59,7 +59,7 @@ export class DemoHaBarButton extends LitElement {
|
|||||||
<ha-control-button
|
<ha-control-button
|
||||||
class=${ifDefined(btn.class)}
|
class=${ifDefined(btn.class)}
|
||||||
label=${ifDefined(btn.label)}
|
label=${ifDefined(btn.label)}
|
||||||
disabled=${ifDefined(btn.disabled)}
|
?disabled=${btn.disabled}
|
||||||
>
|
>
|
||||||
<ha-svg-icon .path=${btn.icon || mdiLightbulb}></ha-svg-icon>
|
<ha-svg-icon .path=${btn.icon || mdiLightbulb}></ha-svg-icon>
|
||||||
</ha-control-button>
|
</ha-control-button>
|
||||||
|
@@ -135,7 +135,7 @@ export class DemoHaControlSelect extends LitElement {
|
|||||||
class=${ifDefined(config.class)}
|
class=${ifDefined(config.class)}
|
||||||
@value-changed=${this.handleValueChanged}
|
@value-changed=${this.handleValueChanged}
|
||||||
aria-labelledby=${id}
|
aria-labelledby=${id}
|
||||||
disabled=${ifDefined(config.disabled)}
|
?disabled=${config.disabled}
|
||||||
>
|
>
|
||||||
</ha-control-select>
|
</ha-control-select>
|
||||||
</div>
|
</div>
|
||||||
@@ -156,7 +156,7 @@ export class DemoHaControlSelect extends LitElement {
|
|||||||
class=${ifDefined(config.class)}
|
class=${ifDefined(config.class)}
|
||||||
@value-changed=${this.handleValueChanged}
|
@value-changed=${this.handleValueChanged}
|
||||||
aria-labelledby=${id}
|
aria-labelledby=${id}
|
||||||
disabled=${ifDefined(config.disabled)}
|
?disabled=${config.disabled}
|
||||||
>
|
>
|
||||||
</ha-control-select>
|
</ha-control-select>
|
||||||
`;
|
`;
|
||||||
|
@@ -63,8 +63,8 @@ export class DemoHaControlSwitch extends LitElement {
|
|||||||
.pathOn=${mdiLightbulb}
|
.pathOn=${mdiLightbulb}
|
||||||
.pathOff=${mdiLightbulbOff}
|
.pathOff=${mdiLightbulbOff}
|
||||||
aria-labelledby=${id}
|
aria-labelledby=${id}
|
||||||
disabled=${ifDefined(config.disabled)}
|
?disabled=${config.disabled}
|
||||||
reversed=${ifDefined(config.reversed)}
|
?reversed=${config.reversed}
|
||||||
>
|
>
|
||||||
</ha-control-switch>
|
</ha-control-switch>
|
||||||
</div>
|
</div>
|
||||||
@@ -86,8 +86,8 @@ export class DemoHaControlSwitch extends LitElement {
|
|||||||
aria-label=${label}
|
aria-label=${label}
|
||||||
.pathOn=${mdiGarageOpen}
|
.pathOn=${mdiGarageOpen}
|
||||||
.pathOff=${mdiGarage}
|
.pathOff=${mdiGarage}
|
||||||
disabled=${ifDefined(config.disabled)}
|
?disabled=${config.disabled}
|
||||||
reversed=${ifDefined(config.reversed)}
|
?reversed=${config.reversed}
|
||||||
>
|
>
|
||||||
</ha-control-switch>
|
</ha-control-switch>
|
||||||
`;
|
`;
|
||||||
|
@@ -3,6 +3,7 @@ import { css, html, LitElement, TemplateResult } from "lit";
|
|||||||
import { customElement } from "lit/decorators";
|
import { customElement } from "lit/decorators";
|
||||||
import "../../../../src/components/ha-card";
|
import "../../../../src/components/ha-card";
|
||||||
import "../../../../src/components/ha-expansion-panel";
|
import "../../../../src/components/ha-expansion-panel";
|
||||||
|
import "../../../../src/components/ha-icon-button";
|
||||||
import "../../../../src/components/ha-markdown";
|
import "../../../../src/components/ha-markdown";
|
||||||
import "../../components/demo-black-white-row";
|
import "../../components/demo-black-white-row";
|
||||||
import { LONG_TEXT } from "../../data/text";
|
import { LONG_TEXT } from "../../data/text";
|
||||||
|
@@ -10,6 +10,7 @@ import { mockHassioSupervisor } from "../../../../demo/src/stubs/hassio_supervis
|
|||||||
import { computeInitialHaFormData } from "../../../../src/components/ha-form/compute-initial-ha-form-data";
|
import { computeInitialHaFormData } from "../../../../src/components/ha-form/compute-initial-ha-form-data";
|
||||||
import "../../../../src/components/ha-form/ha-form";
|
import "../../../../src/components/ha-form/ha-form";
|
||||||
import type { HaFormSchema } from "../../../../src/components/ha-form/types";
|
import type { HaFormSchema } from "../../../../src/components/ha-form/types";
|
||||||
|
import type { AreaRegistryEntry } from "../../../../src/data/area_registry";
|
||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import { HomeAssistant } from "../../../../src/types";
|
import { HomeAssistant } from "../../../../src/types";
|
||||||
@@ -97,22 +98,25 @@ const DEVICES = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const AREAS = [
|
const AREAS: AreaRegistryEntry[] = [
|
||||||
{
|
{
|
||||||
area_id: "backyard",
|
area_id: "backyard",
|
||||||
name: "Backyard",
|
name: "Backyard",
|
||||||
|
icon: null,
|
||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
area_id: "bedroom",
|
area_id: "bedroom",
|
||||||
name: "Bedroom",
|
name: "Bedroom",
|
||||||
|
icon: "mdi:bed",
|
||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
area_id: "livingroom",
|
area_id: "livingroom",
|
||||||
name: "Livingroom",
|
name: "Livingroom",
|
||||||
|
icon: "mdi:sofa",
|
||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
},
|
},
|
||||||
|
@@ -9,6 +9,7 @@ import { mockEntityRegistry } from "../../../../demo/src/stubs/entity_registry";
|
|||||||
import { mockHassioSupervisor } from "../../../../demo/src/stubs/hassio_supervisor";
|
import { mockHassioSupervisor } from "../../../../demo/src/stubs/hassio_supervisor";
|
||||||
import "../../../../src/components/ha-selector/ha-selector";
|
import "../../../../src/components/ha-selector/ha-selector";
|
||||||
import "../../../../src/components/ha-settings-row";
|
import "../../../../src/components/ha-settings-row";
|
||||||
|
import type { AreaRegistryEntry } from "../../../../src/data/area_registry";
|
||||||
import { BlueprintInput } from "../../../../src/data/blueprint";
|
import { BlueprintInput } from "../../../../src/data/blueprint";
|
||||||
import { showDialog } from "../../../../src/dialogs/make-dialog-manager";
|
import { showDialog } from "../../../../src/dialogs/make-dialog-manager";
|
||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
@@ -93,22 +94,25 @@ const DEVICES = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const AREAS = [
|
const AREAS: AreaRegistryEntry[] = [
|
||||||
{
|
{
|
||||||
area_id: "backyard",
|
area_id: "backyard",
|
||||||
name: "Backyard",
|
name: "Backyard",
|
||||||
|
icon: null,
|
||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
area_id: "bedroom",
|
area_id: "bedroom",
|
||||||
name: "Bedroom",
|
name: "Bedroom",
|
||||||
|
icon: "mdi:bed",
|
||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
area_id: "livingroom",
|
area_id: "livingroom",
|
||||||
name: "Livingroom",
|
name: "Livingroom",
|
||||||
|
icon: "mdi:sofa",
|
||||||
picture: null,
|
picture: null,
|
||||||
aliases: [],
|
aliases: [],
|
||||||
},
|
},
|
||||||
@@ -271,6 +275,14 @@ const SCHEMAS: {
|
|||||||
selector: { color_temp: {} },
|
selector: { color_temp: {} },
|
||||||
},
|
},
|
||||||
color_rgb: { name: "Color", selector: { color_rgb: {} } },
|
color_rgb: { name: "Color", selector: { color_rgb: {} } },
|
||||||
|
qr_code: {
|
||||||
|
name: "QR Code",
|
||||||
|
selector: { qr_code: { data: "https://home-assistant.io" } },
|
||||||
|
},
|
||||||
|
constant: {
|
||||||
|
name: "Constant",
|
||||||
|
selector: { constant: { value: true, label: "Yes!" } },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -497,7 +509,7 @@ class DemoHaSelector extends LitElement implements ProvideHassElement {
|
|||||||
this.requestUpdate();
|
this.requestUpdate();
|
||||||
};
|
};
|
||||||
return html`
|
return html`
|
||||||
<demo-black-white-row .title=${info.name} .value=${this.data[idx]}>
|
<demo-black-white-row .title=${info.name}>
|
||||||
${["light", "dark"].map((slot) =>
|
${["light", "dark"].map((slot) =>
|
||||||
Object.entries(info.input).map(
|
Object.entries(info.input).map(
|
||||||
([key, value]) => html`
|
([key, value]) => html`
|
||||||
@@ -530,8 +542,8 @@ class DemoHaSelector extends LitElement implements ProvideHassElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static styles = css`
|
static styles = css`
|
||||||
ha-selector {
|
ha-settings-row {
|
||||||
width: 60;
|
--paper-item-body-two-line-min-height: 0;
|
||||||
}
|
}
|
||||||
.options {
|
.options {
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
|
@@ -18,7 +18,7 @@ The Home Assistant interface is based on Material Design. It's a design system c
|
|||||||
|
|
||||||
We want to make it as easy for designers to contribute as it is for developers. There’s a lot a designer can contribute to:
|
We want to make it as easy for designers to contribute as it is for developers. There’s a lot a designer can contribute to:
|
||||||
|
|
||||||
- Meet us at <a href="https://discord.gg/BPBc8rZ9" rel="noopener noreferrer" target="_blank">devs_ux Discord</a>. Feel free to share your designs, user test or strategic ideas.
|
- Meet us at <a href="https://www.home-assistant.io/join-chat" rel="noopener noreferrer" target="_blank">devs_ux Discord</a>. Feel free to share your designs, user test or strategic ideas.
|
||||||
- Start designing with our <a href="https://www.figma.com/community/file/967153512097289521/Home-Assistant-DesignKit" rel="noopener noreferrer" target="_blank">Figma DesignKit</a>.
|
- Start designing with our <a href="https://www.figma.com/community/file/967153512097289521/Home-Assistant-DesignKit" rel="noopener noreferrer" target="_blank">Figma DesignKit</a>.
|
||||||
- Find the latest UX <a href="https://github.com/home-assistant/frontend/discussions?discussions_q=label%3Aux" rel="noopener noreferrer" target="_blank">discussions</a> and <a href="https://github.com/home-assistant/frontend/labels/ux" rel="noopener noreferrer" target="_blank">issues</a> on GitHub. Everyone can start a new issue or discussion!
|
- Find the latest UX <a href="https://github.com/home-assistant/frontend/discussions?discussions_q=label%3Aux" rel="noopener noreferrer" target="_blank">discussions</a> and <a href="https://github.com/home-assistant/frontend/labels/ux" rel="noopener noreferrer" target="_blank">issues</a> on GitHub. Everyone can start a new issue or discussion!
|
||||||
|
|
||||||
|
@@ -1,19 +1,20 @@
|
|||||||
import { html, css, LitElement } from "lit";
|
import "@material/mwc-list/mwc-list";
|
||||||
|
import { LitElement, css, html } from "lit";
|
||||||
import { customElement, state } from "lit/decorators";
|
import { customElement, state } from "lit/decorators";
|
||||||
|
import { formatDateTimeNumeric } from "../../../../src/common/datetime/format_date_time";
|
||||||
import "../../../../src/components/ha-card";
|
import "../../../../src/components/ha-card";
|
||||||
import "../../../../src/components/ha-control-select";
|
import "../../../../src/components/ha-control-select";
|
||||||
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
|
||||||
import { formatDateTimeNumeric } from "../../../../src/common/datetime/format_date_time";
|
|
||||||
import { timeOptions } from "../../data/date-options";
|
|
||||||
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
|
||||||
import {
|
import {
|
||||||
|
DateFormat,
|
||||||
|
FirstWeekday,
|
||||||
FrontendLocaleData,
|
FrontendLocaleData,
|
||||||
NumberFormat,
|
NumberFormat,
|
||||||
TimeFormat,
|
TimeFormat,
|
||||||
DateFormat,
|
|
||||||
FirstWeekday,
|
|
||||||
TimeZone,
|
TimeZone,
|
||||||
} from "../../../../src/data/translation";
|
} from "../../../../src/data/translation";
|
||||||
|
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
||||||
|
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
||||||
|
import { timeOptions } from "../../data/date-options";
|
||||||
|
|
||||||
@customElement("demo-date-time-date-time-numeric")
|
@customElement("demo-date-time-date-time-numeric")
|
||||||
export class DemoDateTimeDateTimeNumeric extends LitElement {
|
export class DemoDateTimeDateTimeNumeric extends LitElement {
|
||||||
|
@@ -1,19 +1,20 @@
|
|||||||
import { html, css, LitElement } from "lit";
|
import "@material/mwc-list/mwc-list";
|
||||||
|
import { LitElement, css, html } from "lit";
|
||||||
import { customElement, state } from "lit/decorators";
|
import { customElement, state } from "lit/decorators";
|
||||||
|
import { formatDateTimeWithSeconds } from "../../../../src/common/datetime/format_date_time";
|
||||||
import "../../../../src/components/ha-card";
|
import "../../../../src/components/ha-card";
|
||||||
import "../../../../src/components/ha-control-select";
|
import "../../../../src/components/ha-control-select";
|
||||||
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
|
||||||
import { formatDateTimeWithSeconds } from "../../../../src/common/datetime/format_date_time";
|
|
||||||
import { timeOptions } from "../../data/date-options";
|
|
||||||
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
|
||||||
import {
|
import {
|
||||||
|
DateFormat,
|
||||||
|
FirstWeekday,
|
||||||
FrontendLocaleData,
|
FrontendLocaleData,
|
||||||
NumberFormat,
|
NumberFormat,
|
||||||
TimeFormat,
|
TimeFormat,
|
||||||
DateFormat,
|
|
||||||
FirstWeekday,
|
|
||||||
TimeZone,
|
TimeZone,
|
||||||
} from "../../../../src/data/translation";
|
} from "../../../../src/data/translation";
|
||||||
|
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
||||||
|
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
||||||
|
import { timeOptions } from "../../data/date-options";
|
||||||
|
|
||||||
@customElement("demo-date-time-date-time-seconds")
|
@customElement("demo-date-time-date-time-seconds")
|
||||||
export class DemoDateTimeDateTimeSeconds extends LitElement {
|
export class DemoDateTimeDateTimeSeconds extends LitElement {
|
||||||
|
@@ -1,19 +1,20 @@
|
|||||||
import { html, css, LitElement } from "lit";
|
import "@material/mwc-list/mwc-list";
|
||||||
|
import { LitElement, css, html } from "lit";
|
||||||
import { customElement, state } from "lit/decorators";
|
import { customElement, state } from "lit/decorators";
|
||||||
|
import { formatShortDateTimeWithYear } from "../../../../src/common/datetime/format_date_time";
|
||||||
import "../../../../src/components/ha-card";
|
import "../../../../src/components/ha-card";
|
||||||
import "../../../../src/components/ha-control-select";
|
import "../../../../src/components/ha-control-select";
|
||||||
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
|
||||||
import { formatShortDateTimeWithYear } from "../../../../src/common/datetime/format_date_time";
|
|
||||||
import { timeOptions } from "../../data/date-options";
|
|
||||||
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
|
||||||
import {
|
import {
|
||||||
|
DateFormat,
|
||||||
|
FirstWeekday,
|
||||||
FrontendLocaleData,
|
FrontendLocaleData,
|
||||||
NumberFormat,
|
NumberFormat,
|
||||||
TimeFormat,
|
TimeFormat,
|
||||||
DateFormat,
|
|
||||||
FirstWeekday,
|
|
||||||
TimeZone,
|
TimeZone,
|
||||||
} from "../../../../src/data/translation";
|
} from "../../../../src/data/translation";
|
||||||
|
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
||||||
|
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
||||||
|
import { timeOptions } from "../../data/date-options";
|
||||||
|
|
||||||
@customElement("demo-date-time-date-time-short-year")
|
@customElement("demo-date-time-date-time-short-year")
|
||||||
export class DemoDateTimeDateTimeShortYear extends LitElement {
|
export class DemoDateTimeDateTimeShortYear extends LitElement {
|
||||||
|
@@ -1,19 +1,20 @@
|
|||||||
import { html, css, LitElement } from "lit";
|
import "@material/mwc-list/mwc-list";
|
||||||
|
import { LitElement, css, html } from "lit";
|
||||||
import { customElement, state } from "lit/decorators";
|
import { customElement, state } from "lit/decorators";
|
||||||
|
import { formatShortDateTime } from "../../../../src/common/datetime/format_date_time";
|
||||||
import "../../../../src/components/ha-card";
|
import "../../../../src/components/ha-card";
|
||||||
import "../../../../src/components/ha-control-select";
|
import "../../../../src/components/ha-control-select";
|
||||||
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
|
||||||
import { formatShortDateTime } from "../../../../src/common/datetime/format_date_time";
|
|
||||||
import { timeOptions } from "../../data/date-options";
|
|
||||||
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
|
||||||
import {
|
import {
|
||||||
|
DateFormat,
|
||||||
|
FirstWeekday,
|
||||||
FrontendLocaleData,
|
FrontendLocaleData,
|
||||||
NumberFormat,
|
NumberFormat,
|
||||||
TimeFormat,
|
TimeFormat,
|
||||||
DateFormat,
|
|
||||||
FirstWeekday,
|
|
||||||
TimeZone,
|
TimeZone,
|
||||||
} from "../../../../src/data/translation";
|
} from "../../../../src/data/translation";
|
||||||
|
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
||||||
|
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
||||||
|
import { timeOptions } from "../../data/date-options";
|
||||||
|
|
||||||
@customElement("demo-date-time-date-time-short")
|
@customElement("demo-date-time-date-time-short")
|
||||||
export class DemoDateTimeDateTimeShort extends LitElement {
|
export class DemoDateTimeDateTimeShort extends LitElement {
|
||||||
|
@@ -1,19 +1,20 @@
|
|||||||
import { html, css, LitElement } from "lit";
|
import "@material/mwc-list/mwc-list";
|
||||||
|
import { LitElement, css, html } from "lit";
|
||||||
import { customElement, state } from "lit/decorators";
|
import { customElement, state } from "lit/decorators";
|
||||||
|
import { formatDateTime } from "../../../../src/common/datetime/format_date_time";
|
||||||
import "../../../../src/components/ha-card";
|
import "../../../../src/components/ha-card";
|
||||||
import "../../../../src/components/ha-control-select";
|
import "../../../../src/components/ha-control-select";
|
||||||
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
|
||||||
import { formatDateTime } from "../../../../src/common/datetime/format_date_time";
|
|
||||||
import { timeOptions } from "../../data/date-options";
|
|
||||||
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
|
||||||
import {
|
import {
|
||||||
|
DateFormat,
|
||||||
|
FirstWeekday,
|
||||||
FrontendLocaleData,
|
FrontendLocaleData,
|
||||||
NumberFormat,
|
NumberFormat,
|
||||||
TimeFormat,
|
TimeFormat,
|
||||||
DateFormat,
|
|
||||||
FirstWeekday,
|
|
||||||
TimeZone,
|
TimeZone,
|
||||||
} from "../../../../src/data/translation";
|
} from "../../../../src/data/translation";
|
||||||
|
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
||||||
|
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
||||||
|
import { timeOptions } from "../../data/date-options";
|
||||||
|
|
||||||
@customElement("demo-date-time-date-time")
|
@customElement("demo-date-time-date-time")
|
||||||
export class DemoDateTimeDateTime extends LitElement {
|
export class DemoDateTimeDateTime extends LitElement {
|
||||||
|
@@ -1,18 +1,20 @@
|
|||||||
import { html, css, LitElement } from "lit";
|
import "@material/mwc-list/mwc-list";
|
||||||
|
import { LitElement, css, html } from "lit";
|
||||||
import { customElement, state } from "lit/decorators";
|
import { customElement, state } from "lit/decorators";
|
||||||
import "../../../../src/components/ha-card";
|
|
||||||
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
|
||||||
import { formatTimeWithSeconds } from "../../../../src/common/datetime/format_time";
|
import { formatTimeWithSeconds } from "../../../../src/common/datetime/format_time";
|
||||||
import { timeOptions } from "../../data/date-options";
|
import "../../../../src/components/ha-card";
|
||||||
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
import "../../../../src/components/ha-control-select";
|
||||||
import {
|
import {
|
||||||
|
DateFormat,
|
||||||
|
FirstWeekday,
|
||||||
FrontendLocaleData,
|
FrontendLocaleData,
|
||||||
NumberFormat,
|
NumberFormat,
|
||||||
TimeFormat,
|
TimeFormat,
|
||||||
DateFormat,
|
|
||||||
FirstWeekday,
|
|
||||||
TimeZone,
|
TimeZone,
|
||||||
} from "../../../../src/data/translation";
|
} from "../../../../src/data/translation";
|
||||||
|
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
||||||
|
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
||||||
|
import { timeOptions } from "../../data/date-options";
|
||||||
|
|
||||||
@customElement("demo-date-time-time-seconds")
|
@customElement("demo-date-time-time-seconds")
|
||||||
export class DemoDateTimeTimeSeconds extends LitElement {
|
export class DemoDateTimeTimeSeconds extends LitElement {
|
||||||
|
@@ -1,18 +1,20 @@
|
|||||||
import { html, css, LitElement } from "lit";
|
import "@material/mwc-list/mwc-list";
|
||||||
|
import { LitElement, css, html } from "lit";
|
||||||
import { customElement, state } from "lit/decorators";
|
import { customElement, state } from "lit/decorators";
|
||||||
import "../../../../src/components/ha-card";
|
|
||||||
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
|
||||||
import { formatTimeWeekday } from "../../../../src/common/datetime/format_time";
|
import { formatTimeWeekday } from "../../../../src/common/datetime/format_time";
|
||||||
import { timeOptions } from "../../data/date-options";
|
import "../../../../src/components/ha-card";
|
||||||
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
import "../../../../src/components/ha-control-select";
|
||||||
import {
|
import {
|
||||||
|
DateFormat,
|
||||||
|
FirstWeekday,
|
||||||
FrontendLocaleData,
|
FrontendLocaleData,
|
||||||
NumberFormat,
|
NumberFormat,
|
||||||
TimeFormat,
|
TimeFormat,
|
||||||
DateFormat,
|
|
||||||
FirstWeekday,
|
|
||||||
TimeZone,
|
TimeZone,
|
||||||
} from "../../../../src/data/translation";
|
} from "../../../../src/data/translation";
|
||||||
|
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
||||||
|
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
||||||
|
import { timeOptions } from "../../data/date-options";
|
||||||
|
|
||||||
@customElement("demo-date-time-time-weekday")
|
@customElement("demo-date-time-time-weekday")
|
||||||
export class DemoDateTimeTimeWeekday extends LitElement {
|
export class DemoDateTimeTimeWeekday extends LitElement {
|
||||||
|
@@ -1,19 +1,20 @@
|
|||||||
import { html, css, LitElement } from "lit";
|
import "@material/mwc-list/mwc-list";
|
||||||
|
import { LitElement, css, html } from "lit";
|
||||||
import { customElement, state } from "lit/decorators";
|
import { customElement, state } from "lit/decorators";
|
||||||
|
import { formatTime } from "../../../../src/common/datetime/format_time";
|
||||||
import "../../../../src/components/ha-card";
|
import "../../../../src/components/ha-card";
|
||||||
import "../../../../src/components/ha-control-select";
|
import "../../../../src/components/ha-control-select";
|
||||||
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
|
||||||
import { formatTime } from "../../../../src/common/datetime/format_time";
|
|
||||||
import { timeOptions } from "../../data/date-options";
|
|
||||||
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
|
||||||
import {
|
import {
|
||||||
|
DateFormat,
|
||||||
|
FirstWeekday,
|
||||||
FrontendLocaleData,
|
FrontendLocaleData,
|
||||||
NumberFormat,
|
NumberFormat,
|
||||||
TimeFormat,
|
TimeFormat,
|
||||||
DateFormat,
|
|
||||||
FirstWeekday,
|
|
||||||
TimeZone,
|
TimeZone,
|
||||||
} from "../../../../src/data/translation";
|
} from "../../../../src/data/translation";
|
||||||
|
import { demoConfig } from "../../../../src/fake_data/demo_config";
|
||||||
|
import { translationMetadata } from "../../../../src/resources/translations-metadata";
|
||||||
|
import { timeOptions } from "../../data/date-options";
|
||||||
|
|
||||||
@customElement("demo-date-time-time")
|
@customElement("demo-date-time-time")
|
||||||
export class DemoDateTimeTime extends LitElement {
|
export class DemoDateTimeTime extends LitElement {
|
||||||
|
@@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("alarm_control_panel", "alarm", "disarmed", {
|
getEntity("alarm_control_panel", "alarm", "disarmed", {
|
||||||
@@ -84,6 +85,7 @@ class DemoAlarmPanelEntity extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("light", "bed_light", "on", {
|
getEntity("light", "bed_light", "on", {
|
||||||
@@ -146,6 +147,7 @@ class DemoArea extends LitElement {
|
|||||||
entity_id: "binary_sensor.kitchen_door",
|
entity_id: "binary_sensor.kitchen_door",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("light", "controller_1", "on", {
|
getEntity("light", "controller_1", "on", {
|
||||||
@@ -66,6 +67,7 @@ class DemoConditional extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("light", "bed_light", "on", {
|
getEntity("light", "bed_light", "on", {
|
||||||
@@ -323,6 +324,7 @@ class DemoEntities extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("light", "bed_light", "on", {
|
getEntity("light", "bed_light", "on", {
|
||||||
@@ -82,6 +83,7 @@ class DemoButtonEntity extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("device_tracker", "demo_paulus", "work", {
|
getEntity("device_tracker", "demo_paulus", "work", {
|
||||||
@@ -123,6 +124,7 @@ class DemoEntityFilter extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("sensor", "brightness", "12", {}),
|
getEntity("sensor", "brightness", "12", {}),
|
||||||
@@ -128,6 +129,7 @@ class DemoGaugeEntity extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("device_tracker", "demo_paulus", "home", {
|
getEntity("device_tracker", "demo_paulus", "home", {
|
||||||
@@ -238,6 +239,7 @@ class DemoGlanceEntity extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,6 +4,7 @@ import { mockHistory } from "../../../../demo/src/stubs/history";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("light", "kitchen_lights", "on", {
|
getEntity("light", "kitchen_lights", "on", {
|
||||||
@@ -214,6 +215,7 @@ class DemoStack extends LitElement {
|
|||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
mockHistory(hass);
|
mockHistory(hass);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("light", "bed_light", "on", {
|
getEntity("light", "bed_light", "on", {
|
||||||
@@ -76,6 +77,7 @@ class DemoLightEntity extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -65,15 +65,23 @@ const CONFIGS = [
|
|||||||
>> ...by using additional greater-than signs right next to each other...
|
>> ...by using additional greater-than signs right next to each other...
|
||||||
> > > ...or with spaces between arrows.
|
> > > ...or with spaces between arrows.
|
||||||
|
|
||||||
> **Warning** Hey there
|
> [!NOTE]
|
||||||
> This is a warning with a title
|
> This is a GitHub note alert
|
||||||
|
|
||||||
> **Note**
|
> [!TIP]
|
||||||
> This is a note
|
> This is a GitHub tip alert
|
||||||
|
|
||||||
> **Note**
|
> [!IMPORTANT]
|
||||||
> This is a multiline note
|
> This is a GitHub important alert
|
||||||
> Lorem ipsum...
|
|
||||||
|
> [!WARNING]
|
||||||
|
> This is a GitHub warning alert
|
||||||
|
|
||||||
|
> [!CAUTION]
|
||||||
|
> This is a GitHub caution alert
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> - This is a list entry in GitHub tip alert
|
||||||
|
|
||||||
## Lists
|
## Lists
|
||||||
|
|
||||||
|
@@ -55,7 +55,7 @@ const CONFIGS = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
@customElement("demo-lovelace-media-player-row")
|
@customElement("demo-lovelace-media-player-row")
|
||||||
class DemoHuiMediaPlayerRow extends LitElement {
|
export class DemoLovelaceMediaPlayerRow extends LitElement {
|
||||||
@query("#demos") private _demoRoot!: HTMLElement;
|
@query("#demos") private _demoRoot!: HTMLElement;
|
||||||
|
|
||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
@@ -73,6 +73,6 @@ class DemoHuiMediaPlayerRow extends LitElement {
|
|||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
"demo-lovelace-media-player-rows": DemoHuiMediaPlayerRow;
|
"demo-lovelace-media-player-row": DemoLovelaceMediaPlayerRow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("light", "bed_light", "on", {
|
getEntity("light", "bed_light", "on", {
|
||||||
@@ -138,6 +139,7 @@ class DemoPictureElements extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("light", "kitchen_lights", "on", {
|
getEntity("light", "kitchen_lights", "on", {
|
||||||
@@ -93,6 +94,7 @@ class DemoPictureEntity extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("switch", "decorative_lights", "on", {
|
getEntity("switch", "decorative_lights", "on", {
|
||||||
@@ -134,6 +135,7 @@ class DemoPictureGlance extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators";
|
|||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
import { createPlantEntities } from "../../data/plants";
|
import { createPlantEntities } from "../../data/plants";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const CONFIGS = [
|
const CONFIGS = [
|
||||||
{
|
{
|
||||||
@@ -43,6 +44,7 @@ export class DemoPlantEntity extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(createPlantEntities());
|
hass.addEntities(createPlantEntities());
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ import { customElement, query } from "lit/decorators";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("climate", "ecobee", "auto", {
|
getEntity("climate", "ecobee", "auto", {
|
||||||
@@ -35,6 +36,18 @@ const ENTITIES = [
|
|||||||
friendly_name: "Nest",
|
friendly_name: "Nest",
|
||||||
supported_features: 43,
|
supported_features: 43,
|
||||||
}),
|
}),
|
||||||
|
getEntity("climate", "sensibo", "fan_only", {
|
||||||
|
current_temperature: null,
|
||||||
|
temperature: null,
|
||||||
|
min_temp: 0,
|
||||||
|
max_temp: 1,
|
||||||
|
target_temp_step: 1,
|
||||||
|
hvac_modes: ["fan_only", "off"],
|
||||||
|
friendly_name: "Sensibo purifier",
|
||||||
|
fan_modes: ["low", "high"],
|
||||||
|
fan_mode: "low",
|
||||||
|
supported_features: 9,
|
||||||
|
}),
|
||||||
getEntity("climate", "unavailable", "unavailable", {
|
getEntity("climate", "unavailable", "unavailable", {
|
||||||
supported_features: 43,
|
supported_features: 43,
|
||||||
}),
|
}),
|
||||||
@@ -57,6 +70,23 @@ const CONFIGS = [
|
|||||||
entity: climate.nest
|
entity: climate.nest
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
heading: "Fan only example",
|
||||||
|
config: `
|
||||||
|
- type: thermostat
|
||||||
|
entity: climate.sensibo
|
||||||
|
features:
|
||||||
|
- type: climate-hvac-modes
|
||||||
|
hvac_modes:
|
||||||
|
- fan_only
|
||||||
|
- 'off'
|
||||||
|
- type: climate-fan-modes
|
||||||
|
style: icons
|
||||||
|
fan_modes:
|
||||||
|
- low
|
||||||
|
- high
|
||||||
|
`,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
heading: "Unavailable",
|
heading: "Unavailable",
|
||||||
config: `
|
config: `
|
||||||
@@ -87,6 +117,7 @@ class DemoThermostatEntity extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -6,6 +6,7 @@ import { VacuumEntityFeature } from "../../../../src/data/vacuum";
|
|||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("switch", "tv_outlet", "on", {
|
getEntity("switch", "tv_outlet", "on", {
|
||||||
@@ -79,6 +80,18 @@ const CONFIGS = [
|
|||||||
color: pink
|
color: pink
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
heading: "Whole tile tap action",
|
||||||
|
config: `
|
||||||
|
- type: tile
|
||||||
|
entity: switch.tv_outlet
|
||||||
|
color: pink
|
||||||
|
tap_action:
|
||||||
|
action: toggle
|
||||||
|
icon_tap_action:
|
||||||
|
action: none
|
||||||
|
`,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
heading: "Unknown entity",
|
heading: "Unknown entity",
|
||||||
config: `
|
config: `
|
||||||
@@ -172,6 +185,7 @@ class DemoTile extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
|
mockIcons(hass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,6 +4,7 @@ import { provideHass } from "../../../../src/fake_data/provide_hass";
|
|||||||
import "../../components/demo-cards";
|
import "../../components/demo-cards";
|
||||||
import { getEntity } from "../../../../src/fake_data/entity";
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
import { mockTodo } from "../../../../demo/src/stubs/todo";
|
import { mockTodo } from "../../../../demo/src/stubs/todo";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
|
|
||||||
const ENTITIES = [
|
const ENTITIES = [
|
||||||
getEntity("todo", "shopping_list", "2", {
|
getEntity("todo", "shopping_list", "2", {
|
||||||
@@ -47,6 +48,7 @@ class DemoTodoListEntity extends LitElement {
|
|||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("lovelace", "en");
|
hass.updateTranslations("lovelace", "en");
|
||||||
hass.addEntities(ENTITIES);
|
hass.addEntities(ENTITIES);
|
||||||
|
mockIcons(hass);
|
||||||
|
|
||||||
mockTodo(hass);
|
mockTodo(hass);
|
||||||
}
|
}
|
||||||
|
@@ -11,6 +11,7 @@ import "../../../../src/components/data-table/ha-data-table";
|
|||||||
import type { DataTableColumnContainer } from "../../../../src/components/data-table/ha-data-table";
|
import type { DataTableColumnContainer } from "../../../../src/components/data-table/ha-data-table";
|
||||||
import "../../../../src/components/entity/state-badge";
|
import "../../../../src/components/entity/state-badge";
|
||||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||||
|
import { mockIcons } from "../../../../demo/src/stubs/icons";
|
||||||
import { HomeAssistant } from "../../../../src/types";
|
import { HomeAssistant } from "../../../../src/types";
|
||||||
|
|
||||||
const SENSOR_DEVICE_CLASSES = [
|
const SENSOR_DEVICE_CLASSES = [
|
||||||
@@ -53,6 +54,7 @@ const SENSOR_DEVICE_CLASSES = [
|
|||||||
"volatile_organic_compounds_parts",
|
"volatile_organic_compounds_parts",
|
||||||
"voltage",
|
"voltage",
|
||||||
"volume",
|
"volume",
|
||||||
|
"volume_flow_rate",
|
||||||
"water",
|
"water",
|
||||||
"weight",
|
"weight",
|
||||||
"wind_speed",
|
"wind_speed",
|
||||||
@@ -290,6 +292,7 @@ const ENTITIES: HassEntity[] = [
|
|||||||
createEntity("water_heater.high_demand", "high_demand"),
|
createEntity("water_heater.high_demand", "high_demand"),
|
||||||
createEntity("water_heater.heat_pump", "heat_pump"),
|
createEntity("water_heater.heat_pump", "heat_pump"),
|
||||||
createEntity("water_heater.gas", "gas"),
|
createEntity("water_heater.gas", "gas"),
|
||||||
|
createEntity("select.speed", "ridiculous_speed"),
|
||||||
];
|
];
|
||||||
|
|
||||||
function createEntity(
|
function createEntity(
|
||||||
@@ -344,6 +347,7 @@ export class DemoEntityState extends LitElement {
|
|||||||
title: "Icon",
|
title: "Icon",
|
||||||
template: (entry) => html`
|
template: (entry) => html`
|
||||||
<state-badge
|
<state-badge
|
||||||
|
.hass=${hass}
|
||||||
.stateObj=${entry.stateObj}
|
.stateObj=${entry.stateObj}
|
||||||
.stateColor=${true}
|
.stateColor=${true}
|
||||||
></state-badge>
|
></state-badge>
|
||||||
@@ -395,6 +399,16 @@ export class DemoEntityState extends LitElement {
|
|||||||
protected firstUpdated(changedProps) {
|
protected firstUpdated(changedProps) {
|
||||||
super.firstUpdated(changedProps);
|
super.firstUpdated(changedProps);
|
||||||
const hass = provideHass(this);
|
const hass = provideHass(this);
|
||||||
|
mockIcons(hass);
|
||||||
|
hass.updateHass({
|
||||||
|
entities: {
|
||||||
|
"select.speed": {
|
||||||
|
entity_id: "select.speed",
|
||||||
|
translation_key: "speed",
|
||||||
|
platform: "demo",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
hass.updateTranslations(null, "en");
|
hass.updateTranslations(null, "en");
|
||||||
hass.updateTranslations("config", "en");
|
hass.updateTranslations("config", "en");
|
||||||
}
|
}
|
||||||
|
@@ -59,3 +59,9 @@ export class DemoUtilLongPress extends LitElement {
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
"demo-misc-util-long-press": DemoUtilLongPress;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -31,6 +31,21 @@ const ENTITIES = [
|
|||||||
max_temp: 30,
|
max_temp: 30,
|
||||||
supported_features: ClimateEntityFeature.TARGET_TEMPERATURE,
|
supported_features: ClimateEntityFeature.TARGET_TEMPERATURE,
|
||||||
}),
|
}),
|
||||||
|
getEntity("climate", "fan", "fan_only", {
|
||||||
|
friendly_name: "Basic fan",
|
||||||
|
hvac_modes: ["fan_only", "off"],
|
||||||
|
hvac_mode: "fan_only",
|
||||||
|
fan_modes: ["low", "high"],
|
||||||
|
fan_mode: "low",
|
||||||
|
current_temperature: null,
|
||||||
|
temperature: null,
|
||||||
|
min_temp: 0,
|
||||||
|
max_temp: 1,
|
||||||
|
target_temp_step: 1,
|
||||||
|
supported_features:
|
||||||
|
// eslint-disable-next-line no-bitwise
|
||||||
|
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE,
|
||||||
|
}),
|
||||||
getEntity("climate", "hvac", "auto", {
|
getEntity("climate", "hvac", "auto", {
|
||||||
friendly_name: "Basic hvac",
|
friendly_name: "Basic hvac",
|
||||||
hvac_modes: ["auto", "off"],
|
hvac_modes: ["auto", "off"],
|
||||||
@@ -77,7 +92,7 @@ const ENTITIES = [
|
|||||||
|
|
||||||
@customElement("demo-more-info-climate")
|
@customElement("demo-more-info-climate")
|
||||||
class DemoMoreInfoClimate extends LitElement {
|
class DemoMoreInfoClimate extends LitElement {
|
||||||
@property() public hass!: MockHomeAssistant;
|
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||||
|
|
||||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||||
|
|
||||||
|
@@ -141,7 +141,7 @@ const ENTITIES = [
|
|||||||
|
|
||||||
@customElement("demo-more-info-cover")
|
@customElement("demo-more-info-cover")
|
||||||
class DemoMoreInfoCover extends LitElement {
|
class DemoMoreInfoCover extends LitElement {
|
||||||
@property() public hass!: MockHomeAssistant;
|
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||||
|
|
||||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@ const ENTITIES = [
|
|||||||
|
|
||||||
@customElement("demo-more-info-humidifier")
|
@customElement("demo-more-info-humidifier")
|
||||||
class DemoMoreInfoHumidifier extends LitElement {
|
class DemoMoreInfoHumidifier extends LitElement {
|
||||||
@property() public hass!: MockHomeAssistant;
|
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||||
|
|
||||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@ const ENTITIES = [
|
|||||||
|
|
||||||
@customElement("demo-more-info-input-number")
|
@customElement("demo-more-info-input-number")
|
||||||
class DemoMoreInfoInputNumber extends LitElement {
|
class DemoMoreInfoInputNumber extends LitElement {
|
||||||
@property() public hass!: MockHomeAssistant;
|
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||||
|
|
||||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||||
|
|
||||||
|
3
gallery/src/pages/more-info/input-text.markdown
Normal file
3
gallery/src/pages/more-info/input-text.markdown
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
title: Input Text
|
||||||
|
---
|
46
gallery/src/pages/more-info/input-text.ts
Normal file
46
gallery/src/pages/more-info/input-text.ts
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
import { html, LitElement, PropertyValues, TemplateResult } from "lit";
|
||||||
|
import { customElement, property, query } from "lit/decorators";
|
||||||
|
import "../../../../src/components/ha-card";
|
||||||
|
import "../../../../src/dialogs/more-info/more-info-content";
|
||||||
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
|
import {
|
||||||
|
MockHomeAssistant,
|
||||||
|
provideHass,
|
||||||
|
} from "../../../../src/fake_data/provide_hass";
|
||||||
|
import "../../components/demo-more-infos";
|
||||||
|
|
||||||
|
const ENTITIES = [
|
||||||
|
getEntity("input_text", "text", "Inspiration", {
|
||||||
|
friendly_name: "Text",
|
||||||
|
mode: "text",
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
|
||||||
|
@customElement("demo-more-info-input-text")
|
||||||
|
class DemoMoreInfoInputText extends LitElement {
|
||||||
|
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||||
|
|
||||||
|
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||||
|
|
||||||
|
protected render(): TemplateResult {
|
||||||
|
return html`
|
||||||
|
<demo-more-infos
|
||||||
|
.hass=${this.hass}
|
||||||
|
.entities=${ENTITIES.map((ent) => ent.entityId)}
|
||||||
|
></demo-more-infos>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected firstUpdated(changedProperties: PropertyValues) {
|
||||||
|
super.firstUpdated(changedProperties);
|
||||||
|
const hass = provideHass(this._demoRoot);
|
||||||
|
hass.updateTranslations(null, "en");
|
||||||
|
hass.addEntities(ENTITIES);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
"demo-more-info-input-text": DemoMoreInfoInputText;
|
||||||
|
}
|
||||||
|
}
|
@@ -140,7 +140,7 @@ const ENTITIES = [
|
|||||||
|
|
||||||
@customElement("demo-more-info-light")
|
@customElement("demo-more-info-light")
|
||||||
class DemoMoreInfoLight extends LitElement {
|
class DemoMoreInfoLight extends LitElement {
|
||||||
@property() public hass!: MockHomeAssistant;
|
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||||
|
|
||||||
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||||
|
|
||||||
|
3
gallery/src/pages/more-info/lock.markdown
Normal file
3
gallery/src/pages/more-info/lock.markdown
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
title: Lock
|
||||||
|
---
|
49
gallery/src/pages/more-info/lock.ts
Normal file
49
gallery/src/pages/more-info/lock.ts
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
import { html, LitElement, PropertyValues, TemplateResult } from "lit";
|
||||||
|
import { customElement, property, query } from "lit/decorators";
|
||||||
|
import "../../../../src/components/ha-card";
|
||||||
|
import "../../../../src/dialogs/more-info/more-info-content";
|
||||||
|
import { getEntity } from "../../../../src/fake_data/entity";
|
||||||
|
import {
|
||||||
|
MockHomeAssistant,
|
||||||
|
provideHass,
|
||||||
|
} from "../../../../src/fake_data/provide_hass";
|
||||||
|
import "../../components/demo-more-infos";
|
||||||
|
|
||||||
|
const ENTITIES = [
|
||||||
|
getEntity("lock", "lock", "locked", {
|
||||||
|
friendly_name: "Lock",
|
||||||
|
device_class: "lock",
|
||||||
|
}),
|
||||||
|
getEntity("lock", "unavailable", "unavailable", {
|
||||||
|
friendly_name: "Unavailable lock",
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
|
||||||
|
@customElement("demo-more-info-lock")
|
||||||
|
class DemoMoreInfoLock extends LitElement {
|
||||||
|
@property({ attribute: false }) public hass!: MockHomeAssistant;
|
||||||
|
|
||||||
|
@query("demo-more-infos") private _demoRoot!: HTMLElement;
|
||||||
|
|
||||||
|
protected render(): TemplateResult {
|
||||||
|
return html`
|
||||||
|
<demo-more-infos
|
||||||
|
.hass=${this.hass}
|
||||||
|
.entities=${ENTITIES.map((ent) => ent.entityId)}
|
||||||
|
></demo-more-infos>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected firstUpdated(changedProperties: PropertyValues) {
|
||||||
|
super.firstUpdated(changedProperties);
|
||||||
|
const hass = provideHass(this._demoRoot);
|
||||||
|
hass.updateTranslations(null, "en");
|
||||||
|
hass.addEntities(ENTITIES);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
"demo-more-info-lock": DemoMoreInfoLock;
|
||||||
|
}
|
||||||
|
}
|
3
gallery/src/pages/more-info/media-player.markdown
Normal file
3
gallery/src/pages/more-info/media-player.markdown
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
title: Media Player
|
||||||
|
---
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user