Guest User

Untitled

a guest
Jul 14th, 2025
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.50 KB | None | 0 0
  1. button_card_templates:
  2. ulm_language_variables:
  3. variables:
  4. ulm_currency: €
  5. ulm_updates_available: Updates beschikbaar!
  6. ulm_no_updates_available: Geen updates beschikbaar
  7. ulm_ophaling: Huisvuilophaling!
  8. ulm_geen_ophaling: Geen ophalingen
  9. ulm_volgende_ophaling: Volgende ophalingen
  10. ulm_morning: Goedemorgen
  11. ulm_afternoon: Goedemiddag
  12. ulm_evening: Goedenavond
  13. ulm_hello: Hallo
  14. ulm_volume: Volume
  15. ulm_popups_color: Kleur
  16. ulm_radar: Radar
  17. ulm_popup_total: Totaal
  18. card_esh_welcome:
  19. template: ulm_language_variables
  20. variables:
  21. ulm_weather: '[[[ return variables.ulm_weather]]]'
  22. entity_1:
  23. color: |
  24. [[[
  25. var colors = ['yellow', 'blue', 'red', 'purple','green', 'pink'];
  26. var color = colors[Math.floor(Math.random() * colors.length)];
  27. return color;
  28. ]]]
  29. entity_2:
  30. color: |
  31. [[[
  32. var colors = ['yellow', 'blue', 'red', 'purple','green', 'pink'];
  33. var color = colors[Math.floor(Math.random() * colors.length)];
  34. return color;
  35. ]]]
  36. entity_3:
  37. color: |
  38. [[[
  39. var colors = ['yellow', 'blue', 'red', 'purple','green', 'pink'];
  40. var color = colors[Math.floor(Math.random() * colors.length)];
  41. return color;
  42. ]]]
  43. entity_4:
  44. color: |
  45. [[[
  46. var colors = ['yellow', 'blue', 'red', 'purple','green', 'pink'];
  47. var color = colors[Math.floor(Math.random() * colors.length)];
  48. return color;
  49. ]]]
  50. entity_5:
  51. color: |
  52. [[[
  53. var colors = ['yellow', 'blue', 'red', 'purple','green', 'pink'];
  54. var color = colors[Math.floor(Math.random() * colors.length)];
  55. return color;
  56. ]]]
  57. show_icon: false
  58. show_label: true
  59. show_name: false
  60. styles:
  61. grid:
  62. - grid-template-areas: |
  63. [[[
  64. if(variables.ulm_card_esh_welcome_collapse && states[variables.ulm_card_esh_welcome_collapse].state == 'on'){
  65. return "\'item1\' \'item2\' ";
  66. } else {
  67. return "\'item1\' \'item2\' \'item3\'";
  68. }
  69. ]]]
  70. - grid-template-columns: 1fr
  71. - grid-template-rows: min-content min-content
  72. - row-gap: 0px
  73. card:
  74. - border-radius: var(--border-radius)
  75. - box-shadow: var(--box-shadow)
  76. - padding: 10px
  77. - cursor: default
  78. - '--mdc-ripple-press-opacity': 0
  79. custom_fields:
  80. item3:
  81. - display: |
  82. [[[
  83. if(variables.ulm_card_esh_welcome_collapse && states[variables.ulm_card_esh_welcome_collapse].state == 'on'){
  84. return "none";
  85. } else {
  86. return "block";
  87. }
  88. ]]]
  89. item4:
  90. - display: |
  91. [[[
  92. if(variables.ulm_card_esh_welcome_collapse && states[variables.ulm_card_esh_welcome_collapse].state == 'on'){
  93. return "none";
  94. } else {
  95. return "block";
  96. }
  97. ]]]
  98. custom_fields:
  99. item1:
  100. card:
  101. type: custom:button-card
  102. template: card_esh_welcome_topbar
  103. variables:
  104. ulm_card_esh_welcome_collapse: '[[[ return variables.ulm_card_esh_welcome_collapse ]]]'
  105. ulm_weather: '[[[ return variables.ulm_weather]]]'
  106. styles:
  107. card:
  108. - border-radius: none
  109. - box-shadow: none
  110. - padding: 4px
  111. - margin-left: relative
  112. - cursor: default
  113. - '--mdc-ripple-press-opacity': 0
  114. item2:
  115. card:
  116. type: custom:button-card
  117. show_icon: false
  118. show_label: false
  119. show_name: true
  120. show_entity_picture: false
  121. name: |
  122. [[[
  123. var today = new Date();
  124. var time = today.getHours()
  125. let welcome = '';
  126. if (time >= '18'){
  127. welcome = variables.ulm_evening;
  128. } else if (time >= '12'){
  129. welcome = variables.ulm_afternoon;
  130. } else if (time >= '5'){
  131. welcome = variables.ulm_morning;
  132. } else {
  133. welcome = variables.ulm_hello;
  134. }
  135. return welcome + ', ' + ' <br>' + user.name + '!';
  136. ]]]
  137. styles:
  138. name:
  139. - align-self: start
  140. - justify-self: start
  141. - font-weight: bold
  142. - font-size: 24px
  143. - margin-left: 16px
  144. grid:
  145. - grid-template-areas: '''i n'' ''i l'''
  146. - grid-template-columns: min-content auto
  147. - grid-template-rows: min-content min-content
  148. - text-align: start
  149. card:
  150. - box-shadow: none
  151. - padding-bottom: 8px
  152. - cursor: default
  153. - '--mdc-ripple-press-opacity': 0
  154. item3:
  155. card:
  156. type: custom:button-card
  157. template: card_esh_welcome_nav
  158. styles:
  159. card:
  160. - border-radius: none
  161. - box-shadow: none
  162. - padding: 4px
  163. - cursor: default
  164. - '--mdc-ripple-press-opacity': 0
  165. variables:
  166. entity_1: '[[[ return variables.entity_1 ]]]'
  167. entity_2: '[[[ return variables.entity_2 ]]]'
  168. entity_3: '[[[ return variables.entity_3 ]]]'
  169. entity_4: '[[[ return variables.entity_4 ]]]'
  170. entity_5: '[[[ return variables.entity_5 ]]]'
  171. card_esh_welcome_title:
  172. tap_action:
  173. action: none
  174. show_icon: false
  175. show_label: true
  176. show_name: true
  177. styles:
  178. label:
  179. - justify-self: start
  180. - font-weight: bold
  181. - font-size: 1rem
  182. - opacity: '0.4'
  183. name:
  184. - justify-self: start
  185. - font-weight: bold
  186. - font-size: 20px
  187. grid:
  188. - grid-template-areas: '''n'' ''l'''
  189. - grid-template-columns: 1fr
  190. - grid-template-rows: min-content min-content
  191. card:
  192. - background-color: rgba(0,0,0,0)
  193. - box-shadow: none
  194. - height: auto
  195. - width: auto
  196. - margin-top: '-10px'
  197. - margin-left: 16px
  198. - margin-bottom: '-15px'
  199. - cursor: default
  200. - '--mdc-ripple-press-opacity': 0
  201. card_esh_welcome_nav:
  202. show_icon: false
  203. show_name: true
  204. show_label: false
  205. styles:
  206. grid:
  207. - grid-template-areas: |
  208. [[[
  209. return "'" + [(variables.entity_1?.nav ? 'item1' : ''),
  210. (variables.entity_2?.nav ? 'item2' : ''),
  211. (variables.entity_3?.nav ? 'item3' : ''),
  212. (variables.entity_4?.nav ? 'item4' : ''),
  213. (variables.entity_5?.nav ? 'item5' : '')].join(' ') + "'";
  214. ]]]
  215. - grid-template-columns: |
  216. [[[
  217. return [(variables.entity_1?.nav ? '1fr' : ''),
  218. (variables.entity_2?.nav ? '1fr' : ''),
  219. (variables.entity_3?.nav ? '1fr' : ''),
  220. (variables.entity_4?.nav ? '1fr' : ''),
  221. (variables.entity_5?.nav ? '1fr' : '')].join(' ');
  222. ]]]
  223. - grid-template-rows: min-content
  224. - justify-items: center
  225. card:
  226. - border-radius: var(--border-radius)
  227. - box-shadow: var(--box-shadow)
  228. - padding: 12px
  229. - overflow: visible
  230. custom_fields:
  231. item1:
  232. card:
  233. type: custom:button-card
  234. template: card_esh_welcome_pill_nav
  235. variables:
  236. number_of_nav_pills: |
  237. [[[
  238. return [variables.entity_1?.nav,
  239. variables.entity_2?.nav,
  240. variables.entity_3?.nav,
  241. variables.entity_4?.nav,
  242. variables.entity_5?.nav].filter(el => el !== undefined).length;
  243. ]]]
  244. entity: '[[[ return variables.entity_1; ]]]'
  245. item2:
  246. card:
  247. type: custom:button-card
  248. template: card_esh_welcome_pill_nav
  249. variables:
  250. number_of_nav_pills: |
  251. [[[
  252. return [variables.entity_1?.nav,
  253. variables.entity_2?.nav,
  254. variables.entity_3?.nav,
  255. variables.entity_4?.nav,
  256. variables.entity_5?.nav].filter(el => el !== undefined).length;
  257. ]]]
  258. entity: '[[[ return variables.entity_2; ]]]'
  259. item3:
  260. card:
  261. type: custom:button-card
  262. template: card_esh_welcome_pill_nav
  263. variables:
  264. number_of_nav_pills: |
  265. [[[
  266. return [variables.entity_1?.nav,
  267. variables.entity_2?.nav,
  268. variables.entity_3?.nav,
  269. variables.entity_4?.nav,
  270. variables.entity_5?.nav].filter(el => el !== undefined).length;
  271. ]]]
  272. entity: '[[[ return variables.entity_3; ]]]'
  273. item4:
  274. card:
  275. type: custom:button-card
  276. template: card_esh_welcome_pill_nav
  277. variables:
  278. number_of_nav_pills: |
  279. [[[
  280. return [variables.entity_1?.nav,
  281. variables.entity_2?.nav,
  282. variables.entity_3?.nav,
  283. variables.entity_4?.nav,
  284. variables.entity_5?.nav].filter(el => el !== undefined).length;
  285. ]]]
  286. entity: '[[[ return variables.entity_4; ]]]'
  287. item5:
  288. card:
  289. type: custom:button-card
  290. template: card_esh_welcome_pill_nav
  291. variables:
  292. number_of_nav_pills: |
  293. [[[
  294. return [variables.entity_1?.nav,
  295. variables.entity_2?.nav,
  296. variables.entity_3?.nav,
  297. variables.entity_4?.nav,
  298. variables.entity_5?.nav].filter(el => el !== undefined).length;
  299. ]]]
  300. entity: '[[[ return variables.entity_5; ]]]'
  301. card_esh_welcome_pill_nav:
  302. tap_action:
  303. action: navigate
  304. navigation_path: '[[[ return variables.entity?.nav; ]]]'
  305. show_icon: false
  306. show_label: false
  307. show_name: false
  308. state:
  309. - operator: template
  310. value: '[[[ return !variables.entity?.nav; ]]]'
  311. styles:
  312. card:
  313. - display: none
  314. styles:
  315. grid:
  316. - grid-template-areas: '''item1'' ''item2'''
  317. - grid-template-columns: 1fr
  318. - grid-template-rows: 1fr 1fr
  319. - row-gap: 12px
  320. - justify-items: center
  321. - column-gap: auto
  322. card:
  323. - border-radius: 50px
  324. - place-self: center
  325. - width: >-
  326. [[[ return (52 * (1+(5-Math.max(variables.number_of_nav_pills,
  327. 3))*0.25)) + 'px'; ]]]
  328. - height: >-
  329. [[[ return (84 * (1+(5-Math.max(variables.number_of_nav_pills,
  330. 3))*0.25)) + 'px'; ]]]
  331. - box-shadow: |
  332. [[[
  333. if (hass.themes.darkMode){
  334. return "0px 2px 4px 0px rgba(0,0,0,0.80)";
  335. } else {
  336. return "var(--box-shadow)";
  337. }
  338. ]]]
  339. - '--mdc-ripple-press-opacity': 0.12
  340. color: var(--google-grey)
  341. custom_fields:
  342. item1:
  343. card:
  344. type: custom:button-card
  345. tap_action:
  346. action: navigate
  347. navigation_path: '[[[ return variables.entity?.nav; ]]]'
  348. show_icon: true
  349. show_label: false
  350. show_name: false
  351. icon: '[[[ return variables.entity?.icon ]]]'
  352. styles:
  353. icon:
  354. - color: >-
  355. [[[ return `rgba(var(--color-${variables.entity?.color}),
  356. 1)`;]]]
  357. - width: >-
  358. [[[ return (20 * (1+(5-Math.max(variables.number_of_nav_pills,
  359. 3))*0.25)) + 'px'; ]]]
  360. img_cell:
  361. - background-color: >-
  362. [[[ return `rgba(var(--color-${variables.entity?.color}),
  363. 0.20)`;]]]
  364. - border-radius: 50%
  365. - width: >-
  366. [[[ return (42 * (1+(5-Math.max(variables.number_of_nav_pills,
  367. 3))*0.25)) + 'px'; ]]]
  368. - height: >-
  369. [[[ return (42 * (1+(5-Math.max(variables.number_of_nav_pills,
  370. 3))*0.25)) + 'px'; ]]]
  371. grid:
  372. - grid-template-areas: i
  373. card:
  374. - box-shadow: none
  375. - border-radius: 50px
  376. - padding: 5px
  377. state:
  378. - value: 'on'
  379. styles:
  380. card:
  381. - overflow: visible
  382. - box-shadow: |
  383. [[[
  384. if (hass.themes.darkMode){
  385. return "0px 2px 4px 0px rgba(0,0,0,0.80)";
  386. } else {
  387. return "var(--box-shadow)";
  388. }
  389. ]]]
  390. item2:
  391. card:
  392. type: custom:button-card
  393. tap_action:
  394. action: navigate
  395. navigation_path: '[[[ return variables.entity?.nav; ]]]'
  396. show_icon: false
  397. show_label: false
  398. name: '[[[ return variables.entity?.name ]]]'
  399. styles:
  400. name:
  401. - font-weight: bold
  402. - font-size: >-
  403. [[[ return (9.5 *
  404. (1+(5-Math.max(variables.number_of_nav_pills, 3))*0.25)) +
  405. 'px'; ]]]
  406. - width: >-
  407. [[[ return (33 * (1+(5-Math.max(variables.number_of_nav_pills,
  408. 3))*0.25)) + 'px'; ]]]
  409. - padding-bottom: 7px
  410. grid:
  411. - grid-template-areas: 'n'
  412. card:
  413. - box-shadow: none
  414. - padding: 0px 5px 5px 5px
  415. - margin-top: '-5px'
  416. - border-radius: 50px
  417. card_esh_welcome_topbar:
  418. show_icon: false
  419. show_label: false
  420. show_name: true
  421. styles:
  422. grid:
  423. - grid-template-areas: '''item1 item2 item3'''
  424. - grid-template-columns: 1fr 7fr 1fr
  425. - grid-template-rows: min-content
  426. - justify-items: center
  427. card:
  428. - border-radius: var(--border-radius)
  429. - box-shadow: var(--box-shadow)
  430. - padding: 12px
  431. - cursor: default
  432. - '--mdc-ripple-press-opacity': 0
  433. custom_fields:
  434. item1:
  435. card:
  436. type: custom:button-card
  437. template: chips
  438. tap_action:
  439. action: perform-action
  440. perform_action: input_boolean.toggle
  441. target:
  442. entity_id: '[[[ return variables.ulm_card_esh_welcome_collapse ]]]'
  443. show_icon: true
  444. icon: mdi:chevron-up
  445. entity: '[[[ return variables.ulm_card_esh_welcome_collapse ]]]'
  446. styles:
  447. grid:
  448. - grid-template-areas: '''i'''
  449. card:
  450. - box-shadow: |
  451. [[[
  452. if (hass.themes.darkMode){
  453. return "0px 2px 4px 0px rgba(0,0,0,0.80)";
  454. } else {
  455. return "var(--box-shadow)";
  456. }
  457. ]]]
  458. - visibility: >-
  459. [[[ return variables.ulm_card_esh_welcome_collapse ? 'visible'
  460. : 'hidden'; ]]]
  461. - '--mdc-ripple-press-opacity': 0.12
  462. state:
  463. - value: 'on'
  464. icon: mdi:chevron-down
  465. styles:
  466. icon:
  467. - color: rgb(var(--color-theme))
  468. item2:
  469. card:
  470. type: custom:button-card
  471. template: chip_weather_date
  472. variables:
  473. ulm_weather: '[[[ return variables.ulm_weather]]]'
  474. tap_action:
  475. action: more-info
  476. entity: '[[[ return variables.ulm_weather]]]'
  477. styles:
  478. card:
  479. - width: 100px
  480. - box-shadow: |
  481. [[[
  482. if (hass.themes.darkMode){
  483. return "0px 2px 4px 0px rgba(0,0,0,0.80)";
  484. } else {
  485. return "var(--box-shadow)";
  486. }
  487. ]]]
  488. - '--mdc-ripple-press-opacity': 0.12
  489. item3:
  490. card:
  491. type: custom:button-card
  492. template: chip_mdi_icon_only
  493. variables:
  494. ulm_chip_mdi_icon_only_icon: mdi:cog-outline
  495. tap_action:
  496. action: navigate
  497. navigation_path: /config/dashboard
  498. styles:
  499. card:
  500. - align-self: end
  501. - box-shadow: |
  502. [[[
  503. if (hass.themes.darkMode){
  504. return "0px 2px 4px 0px rgba(0,0,0,0.80)";
  505. } else {
  506. return "var(--box-shadow)";
  507. }
  508. ]]]
  509. - '--mdc-ripple-press-opacity': 0.12
  510. views:
  511. - title: Home
  512. type: panel
  513. cards:
  514. - type: custom:button-card
  515. template: card_esh_welcome
  516. triggers_update: input_boolean.minimalist_dropdown
  517. variables:
  518. ulm_card_esh_welcome_collapse: input_boolean.minimalist_dropdown
  519. ulm_weather: weather.buienradar
  520. entity_1:
  521. nav: home
  522. icon: mdi:home-circle-outline
  523. name: Home
  524. color: red
  525. entity_2:
  526. nav: rooms
  527. icon: mdi:floor-plan
  528. name: Rooms
  529. color: yellow
  530. entity_3:
  531. nav: energy
  532. icon: mdi:home-lightning-bolt
  533. name: Energy
  534. color: green
  535. entity_4:
  536. nav: system
  537. icon: mdi:nas
  538. name: System
  539. color: purple
  540. entity_5:
  541. nav: weather
  542. icon: mdi:weather-partly-cloudy
  543. name: Weather
  544. color: blue
Add Comment
Please, Sign In to add comment