Guest User

Untitled

a guest
Jan 24th, 2025
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.19 KB | None | 0 0
  1. square: true
  2. type: custom:layout-card
  3. cards:
  4. - type: vertical-stack
  5. view_layout: null
  6. grid-area: left
  7. cards:
  8. - type: picture-elements
  9. elements:
  10. - type: conditional
  11. conditions:
  12. - condition: state
  13. state_not: unavailable
  14. entity: sensor.p1s_<SERIAL>_ams_1_id
  15. - condition: state
  16. state_not: unknown
  17. entity: sensor.p1s_<SERIAL>_ams_1_id
  18. elements:
  19. - type: state-label
  20. entity: sensor.p1s_<SERIAL>_ams_1_id
  21. tap_action:
  22. action: none
  23. style:
  24. top: 77%
  25. left: 9.6%
  26. text-align: center
  27. font-size: 0.84em
  28. background-color: rgba(0,0,0,0)
  29. box-shadow: 0 0 3px 3px rgba(0, 0, 0, 0)
  30. border-radius: 10px
  31. pointer-events: none
  32. color: "#FFFFFF"
  33. - type: state-label
  34. entity: sensor.p1s_<SERIAL>_ams_1_tray_1
  35. tap_action:
  36. action: none
  37. style:
  38. top: 28%
  39. left: 21.5%
  40. text-align: center
  41. font-size: 0em
  42. background-color: var(--tray_1_color)
  43. opacity: 90%
  44. box-shadow: 0 0 3px 3px var(--tray_1_bg)
  45. border-radius: 2px
  46. width: 14%
  47. height: 40%
  48. pointer-events: none
  49. - type: custom:config-template-card
  50. entities:
  51. - sensor.p1s_<SERIAL>_ams_1_tray_1
  52. element:
  53. type: state-icon
  54. entity: sensor.p1s_<SERIAL>_ams_1_tray_1
  55. icon: mdi:numeric-1-circle
  56. style:
  57. top: 28%
  58. left: 21.4%
  59. "--paper-item-icon-color": white
  60. background-color: rgba(0,0,0,0.5)
  61. box-shadow: 0 0 5px 5px var(--tray_1_bg)
  62. border-radius: 50px
  63. "--mdc-icon-size": 2.4em
  64. - type: state-label
  65. entity: sensor.p1s_<SERIAL>_ams_1_tray_1
  66. attribute: type
  67. tap_action:
  68. action: none
  69. style:
  70. top: 77%
  71. left: 21%
  72. text-align: center
  73. font-size: 1em
  74. background-color: rgba(0,0,0,0.4)
  75. box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.4)
  76. border-radius: 50px
  77. pointer-events: none
  78. color: "#FFFFFF"
  79. - type: state-label
  80. entity: sensor.p1s_<SERIAL>_ams_1_tray_2
  81. tap_action:
  82. action: none
  83. style:
  84. top: 28%
  85. left: 39.65%
  86. text-align: center
  87. font-size: 0em
  88. background-color: var(--tray_2_color)
  89. opacity: 90%
  90. box-shadow: 0 0 3px 3px var(--tray_2_bg)
  91. border-radius: 2px
  92. width: 14%
  93. height: 40%
  94. pointer-events: none
  95. - type: custom:config-template-card
  96. entities:
  97. - sensor.p1s_<SERIAL>_ams_1_tray_2
  98. element:
  99. type: state-icon
  100. entity: sensor.p1s_<SERIAL>_ams_1_tray_2
  101. icon: mdi:numeric-2-circle
  102. style:
  103. top: 28%
  104. left: 39.7%
  105. "--paper-item-icon-color": white
  106. background-color: rgba(0,0,0,0.5)
  107. box-shadow: 0 0 5px 5px var(--tray_2_bg)
  108. border-radius: 50px
  109. "--mdc-icon-size": 2.4em
  110. - type: state-label
  111. entity: sensor.p1s_<SERIAL>_ams_1_tray_2
  112. attribute: type
  113. tap_action:
  114. action: none
  115. style:
  116. top: 77%
  117. left: 40%
  118. text-align: center
  119. font-size: 1em
  120. background-color: rgba(0,0,0,0.4)
  121. box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.4)
  122. border-radius: 50px
  123. pointer-events: none
  124. color: "#FFFFFF"
  125. - type: state-label
  126. entity: sensor.p1s_<SERIAL>_ams_1_tray_3
  127. tap_action:
  128. action: none
  129. style:
  130. top: 28%
  131. left: 59.65%
  132. text-align: center
  133. font-size: 0em
  134. background-color: var(--tray_3_color)
  135. opacity: 90%
  136. box-shadow: 0 0 3px 3px var(--tray_3_bg)
  137. border-radius: 2px
  138. width: 14%
  139. height: 40%
  140. pointer-events: none
  141. - type: custom:config-template-card
  142. entities:
  143. - sensor.p1s_<SERIAL>_ams_1_tray_3
  144. element:
  145. type: state-icon
  146. entity: sensor.p1s_<SERIAL>_ams_1_tray_3
  147. icon: mdi:numeric-3-circle
  148. style:
  149. top: 28%
  150. left: 59.7%
  151. "--paper-item-icon-color": white
  152. background-color: rgba(0,0,0,0.5)
  153. box-shadow: 0 0 5px 5px var(--tray_3_bg)
  154. border-radius: 50px
  155. "--mdc-icon-size": 2.4em
  156. - type: state-label
  157. entity: sensor.p1s_<SERIAL>_ams_1_tray_3
  158. attribute: type
  159. tap_action:
  160. action: none
  161. style:
  162. top: 77%
  163. left: 60%
  164. text-align: center
  165. font-size: 1em
  166. background-color: rgba(0,0,0,0.4)
  167. box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.4)
  168. border-radius: 50px
  169. pointer-events: none
  170. color: "#FFFFFF"
  171. - type: state-label
  172. entity: sensor.p1s_<SERIAL>_ams_1_tray_4
  173. tap_action:
  174. action: none
  175. style:
  176. top: 28%
  177. left: 79.4%
  178. text-align: center
  179. font-size: 0em
  180. background-color: var(--tray_4_color)
  181. opacity: 90%
  182. box-shadow: 0 0 3px 3px var(--tray_4_bg)
  183. border-radius: 2px
  184. width: 14%
  185. height: 40%
  186. pointer-events: none
  187. - type: custom:config-template-card
  188. entities:
  189. - sensor.p1s_<SERIAL>_ams_1_tray_4
  190. element:
  191. type: state-icon
  192. entity: sensor.p1s_<SERIAL>_ams_1_tray_4
  193. icon: mdi:numeric-4-circle
  194. style:
  195. top: 28%
  196. left: 79.6%
  197. "--paper-item-icon-color": white
  198. background-color: rgba(0,0,0,0.5)
  199. box-shadow: 0 0 5px 5px var(--tray_4_bg)
  200. border-radius: 50px
  201. "--mdc-icon-size": 2.4em
  202. - type: state-label
  203. entity: sensor.p1s_<SERIAL>_ams_1_tray_4
  204. attribute: type
  205. tap_action:
  206. action: none
  207. style:
  208. top: 77%
  209. left: 79.6%
  210. text-align: center
  211. font-size: 1em
  212. background-color: rgba(0,0,0,0.4)
  213. box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.4)
  214. border-radius: 50px
  215. pointer-events: none
  216. color: "#FFFFFF"
  217. - type: conditional
  218. conditions:
  219. - entity: sensor.p1s_<SERIAL>_print_status
  220. state_not: offline
  221. elements:
  222. - type: conditional
  223. conditions:
  224. - entity: sensor.p1s_<SERIAL>_ams_1_ams_temperature
  225. state_not:
  226. - unavailable
  227. - unknown
  228. elements:
  229. - entity: sensor.p1s_<SERIAL>_ams_1_ams_temperature
  230. type: state-badge
  231. style:
  232. top: 50.75%
  233. left: 8%
  234. font-size: 0.75em
  235. color: rgba(0,0,0,0)
  236. - type: custom:config-template-card
  237. entities:
  238. - sensor.p1s_<SERIAL>_ams_1_humidity_index
  239. element:
  240. type: state-icon
  241. entity: sensor.p1s_<SERIAL>_ams_1_humidity_index
  242. icon: >-
  243. ${'fapro:humidity-level-dark-' +
  244. states['sensor.p1s_<SERIAL>_ams_1_humidity_index'].state
  245. + '#fullcolor'}
  246. style:
  247. top: 38.5%
  248. left: 92.5%
  249. background-color: "#1c1c1c"
  250. border-radius: 50px
  251. border: 0.12em solid var(--humidity-border-color)
  252. "--mdc-icon-size": 2.05em
  253. image: /local/media/bambuprinter/AMS_2.png
  254. camera_view: live
  255. card_mod:
  256. style: |
  257. ha-card {
  258. background: none !important;
  259. border: none !important;
  260. box-shadow: none !important;
  261. --humidity-border-color: {% if states('sensor.p1s_<SERIAL>_ams_1_humidity_index') != 'unavailable' and states('sensor.p1s_<SERIAL>_ams_1_humidity_index') | int > 3 %} rgba(255, 255, 126, 0.5); {% elif states('sensor.p1s_<SERIAL>_ams_1_humidity_index') != 'unavailable' and states('sensor.p1s_<SERIAL>_ams_1_humidity_index') | int > 1 %} rgba(228,127,97,1.0); {% else %} rgba(194,74,72,1.0); {% endif %}
  262. --tray_1_color: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_1', 'color', '#00000000') %} rgb(255, 255, 255); {% else %} {{state_attr('sensor.p1s_<SERIAL>_ams_1_tray_1', 'color') }}; {% endif %}
  263. --tray_2_color: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_2', 'color', '#00000000') %} rgb(255, 255, 255); {% else %} {{state_attr('sensor.p1s_<SERIAL>_ams_1_tray_2', 'color') }}; {% endif %}
  264. --tray_3_color: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_3', 'color', '#00000000') %} rgb(255, 255, 255); {% else %} {{state_attr('sensor.p1s_<SERIAL>_ams_1_tray_3', 'color') }}; {% endif %}
  265. --tray_4_color: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_4', 'color', '#00000000') %} rgb(255, 255, 255); {% else %} {{state_attr('sensor.p1s_<SERIAL>_ams_1_tray_4', 'color') }}; {% endif %}
  266. --tray_1_bg: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_1', 'active', true) %} rgba(255, 255, 126, 0.5); {% else %} rgba(0,0,0,0.5); {% endif %}
  267. --tray_2_bg: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_2', 'active', true) %} rgba(255, 255, 126, 0.5); {% else %} rgba(0,0,0,0.5); {% endif %}
  268. --tray_3_bg: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_3', 'active', true) %} rgba(255, 255, 126, 0.5); {% else %} rgba(0,0,0,0.5); {% endif %}
  269. --tray_4_bg: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_4', 'active', true) %} rgba(255, 255, 126, 0.5); {% else %} rgba(0,0,0,0.5); {% endif %}
  270. }
  271. - type: picture-elements
  272. elements:
  273. - type: conditional
  274. conditions:
  275. - entity: sensor.p1s_<SERIAL>_print_status
  276. state_not: offline
  277. elements:
  278. - entity: light.p1s_<SERIAL>_chamber_light
  279. type: state-icon
  280. icon: far:lightbulb
  281. style:
  282. top: 46%
  283. left: 18%
  284. "--mdc-icon-size": 2.6em
  285. tap_action:
  286. action: toggle
  287. - entity: sensor.p1s_<SERIAL>_print_status
  288. type: state-label
  289. style:
  290. top: 6.5%
  291. left: 23.69%
  292. font-size: 1em
  293. color: "#FFFFFF"
  294. - type: conditional
  295. conditions:
  296. - entity: sensor.p1s_<SERIAL>_print_status
  297. state:
  298. - running
  299. - pause
  300. elements:
  301. - type: conditional
  302. conditions:
  303. - entity: image.p1s_<SERIAL>_cover_image
  304. state_not: unavailable
  305. elements:
  306. - type: custom:hui-element
  307. card_type: picture-entity
  308. show_name: false
  309. show_state: false
  310. entity: image.p1s_<SERIAL>_cover_image
  311. style:
  312. top: 50%
  313. left: 50%
  314. transform: translate(-45%, -40%) scale(75%, 75%)
  315. "--ha-card-border-width": 0px
  316. "--ha-card-background": none
  317. - entity: sensor.p1s_<SERIAL>_print_progress
  318. type: state-badge
  319. tap_action:
  320. action: none
  321. style:
  322. top: 18.5%
  323. left: 81%
  324. font-size: 1em
  325. color: rgba(0,0,0,0)
  326. "--label-badge-red": "#11739D"
  327. - entity: sensor.p1s_<SERIAL>_nozzle_temperature
  328. type: state-badge
  329. style:
  330. top: 31%
  331. left: 51%
  332. font-size: 0.8em
  333. color: rgba(0,0,0,0)
  334. - entity: sensor.p1s_<SERIAL>_bed_temperature
  335. type: state-badge
  336. style:
  337. top: 78%
  338. left: 51%
  339. font-size: 0.8em
  340. color: rgba(0,0,0,0)
  341. - type: conditional
  342. conditions:
  343. - entity: sensor.p1s_<SERIAL>_chamber_temperature
  344. state_not:
  345. - unavailable
  346. - unknown
  347. elements:
  348. - entity: sensor.p1s_<SERIAL>_chamber_temperature
  349. type: state-badge
  350. style:
  351. font-size: 0.8em
  352. top: 31%
  353. left: 19%
  354. color: rgba(0,0,0,0)
  355. - entity: switch.bento_switch_0
  356. type: state-icon
  357. icon: fas:fan
  358. style:
  359. top: 80%
  360. left: 80%
  361. tap_action:
  362. action: toggle
  363. - type: icon
  364. icon: fas:camera
  365. entity: camera.p1s_<SERIAL>_camera
  366. style:
  367. top: 20%
  368. left: 18%
  369. "--mdc-icon-size": 2.6em
  370. card_mod:
  371. style: |
  372. ha-card {
  373. box-shadow: none !important;
  374. background: none !important;
  375. border: none !important;
  376. }
  377. image: /local/media/bambuprinter/on_p1s.png
  378. entity: light.p1s_<SERIAL>_chamber_light
  379. state_image:
  380. unavailable: /local/media/bambuprinter/off_p1s.png
  381. "on": /local/media/bambuprinter/on_p1s.png
  382. "off": /local/media/bambuprinter/off_p1s.png
  383. title: P1S
  384. columns: 2
  385. layout_type: custom:horizontal-layout
  386. layout: {}
  387.  
Advertisement
Add Comment
Please, Sign In to add comment