Advertisement
Guest User

Untitled

a guest
Jun 13th, 2025
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.68 KB | None | 0 0
  1. type: conditional
  2. conditions:
  3. - entity: remote.mason_chromecast
  4. state: 'on'
  5. card:
  6. type: custom:expander-card
  7. card_mod:
  8. style: |
  9. /* ─────────────────────────────────────────────────────────────
  10. 1) When the expander-card ha-card has class="open", hide title-card:
  11. */
  12. ha-card.open .title-card {
  13. display: none !important;
  14. }
  15.  
  16. /* ─────────────────────────────────────────────────────────────
  17. 2) Always hide the built-in chevron (<iron-icon>) from the expander-button:
  18. */
  19. ha-card .expand-button iron-icon {
  20. display: none !important;
  21. }
  22.  
  23. /* ─────────────────────────────────────────────────────────────
  24. 3) Inject an MDI “cast” icon before the expand-button (to replace chevron):
  25. */
  26. ha-card .expand-button::before {
  27. font-family: "Material Design Icons";
  28. /* MDI “cast” codepoint = \e838 */
  29. content: "\e838";
  30. font-size: 28px;
  31. line-height: 1;
  32. color: var(--primary-text-color);
  33. }
  34. title-card:
  35. type: horizontal-stack
  36. cards:
  37. - type: custom:button-card
  38. icon: mdi:power
  39. show_name: false
  40. tap_action:
  41. action: call-service
  42. service: remote.send_command
  43. service_data:
  44. entity_id: remote.mason_chromecast
  45. command: KEYCODE_POWER
  46. styles:
  47. card:
  48. - padding: 4px
  49. - height: 60px
  50. - width: 60px
  51. - background: none
  52. - box-shadow: none
  53. - border: none
  54. icon:
  55. - color: '#662d91'
  56. - type: custom:button-card
  57. icon: mdi:volume-minus
  58. show_name: false
  59. tap_action:
  60. action: call-service
  61. service: media_player.volume_down
  62. service_data:
  63. entity_id: media_player.MasonRokuTV
  64. styles:
  65. card:
  66. - padding: 4px
  67. - height: 60px
  68. - width: 60px
  69. - background: none
  70. - box-shadow: none
  71. - border: none
  72. icon:
  73. - color: '#662d91'
  74. - type: custom:button-card
  75. icon: mdi:play-pause
  76. show_name: false
  77. tap_action:
  78. action: call-service
  79. service: remote.send_command
  80. service_data:
  81. entity_id: remote.mason_chromecast
  82. command: KEYCODE_MEDIA_PLAY_PAUSE
  83. styles:
  84. card:
  85. - padding: 4px
  86. - height: 60px
  87. - width: 60px
  88. - background: none
  89. - box-shadow: none
  90. - border: none
  91. icon:
  92. - color: '#662d91'
  93. - type: custom:button-card
  94. icon: mdi:volume-plus
  95. show_name: false
  96. tap_action:
  97. action: call-service
  98. service: media_player.volume_up
  99. service_data:
  100. entity_id: media_player.MasonRokuTV
  101. styles:
  102. card:
  103. - padding: 4px
  104. - height: 60px
  105. - width: 60px
  106. - background: none
  107. - box-shadow: none
  108. - border: none
  109. icon:
  110. - color: '#662d91'
  111. title-card-button-overlay: true
  112. clear: false
  113. expanded: false
  114. clear-children: false
  115. cards:
  116. - type: custom:mod-card
  117. card_mod:
  118. style: |
  119. ha-card {
  120. background-color: var(--card-background-color);
  121. border-radius: 12px;
  122. box-shadow: var(--ha-card-box-shadow);
  123. padding: 12px;
  124. }
  125. card:
  126. type: vertical-stack
  127. cards:
  128. - type: custom:android-tv-card
  129. remote_id: remote.mason_chromecast
  130. slider_id: media_player.mason_chromecast
  131. keyboard_id: media_player.mason_chromecast_adb
  132. rows:
  133. - - back
  134. - power
  135. - home
  136. - - plex
  137. - pandora
  138. - youtube
  139. - - previous
  140. - play_pause
  141. - next
  142. card_mod:
  143. style: |
  144. ha-card {
  145. background: none;
  146. box-shadow: none;
  147. border: none;
  148. padding: 0;
  149. margin-bottom: 8px;
  150. }
  151. .row {
  152. justify-content: space-between !important;
  153. width: 100% !important;
  154. }
  155. button ha-icon {
  156. background: linear-gradient(145deg, #ccc, #999, #eee) !important;
  157. -webkit-background-clip: text !important;
  158. -webkit-text-fill-color: transparent !important;
  159. color: transparent !important;
  160. }
  161. button[data-type="dpad_center"] ha-icon {
  162. border-radius: 50%;
  163. border: 1px solid #444;
  164. padding: 12px;
  165. }
  166. button[data-type="dpad_up"],
  167. button[data-type="dpad_down"],
  168. button[data-type="dpad_left"],
  169. button[data-type="dpad_right"] {
  170. background: none !important;
  171. box-shadow: none !important;
  172. border: none !important;
  173. }
  174. - type: custom:mod-card
  175. card:
  176. type: grid
  177. columns: 3
  178. square: false
  179. cards:
  180. - type: custom:button-card
  181. show_icon: false
  182. show_name: false
  183. styles:
  184. card:
  185. - display: none
  186. - type: custom:button-card
  187. icon: mdi:arrow-up
  188. show_name: false
  189. tap_action:
  190. action: call-service
  191. service: remote.send_command
  192. service_data:
  193. entity_id: remote.mason_chromecast
  194. command: KEYCODE_DPAD_UP
  195. styles:
  196. card:
  197. - background: none
  198. - border: none
  199. - box-shadow: none
  200. - height: 120px
  201. - width: 120px
  202. icon:
  203. - background: linear-gradient(145deg, #ccc, #999, #eee) !important
  204. - -webkit-background-clip: text
  205. - -webkit-text-fill-color: transparent
  206. - type: custom:button-card
  207. show_icon: false
  208. show_name: false
  209. styles:
  210. card:
  211. - display: none
  212. - type: custom:button-card
  213. icon: mdi:arrow-left
  214. show_name: false
  215. tap_action:
  216. action: call-service
  217. service: remote.send_command
  218. service_data:
  219. entity_id: remote.mason_chromecast
  220. command: KEYCODE_DPAD_LEFT
  221. styles:
  222. card:
  223. - background: none
  224. - border: none
  225. - box-shadow: none
  226. - height: 120px
  227. - width: 120px
  228. icon:
  229. - background: linear-gradient(145deg, #ccc, #999, #eee) !important
  230. - -webkit-background-clip: text
  231. - -webkit-text-fill-color: transparent
  232. - type: custom:button-card
  233. icon: mdi:checkbox-blank-circle
  234. show_name: false
  235. tap_action:
  236. action: call-service
  237. service: remote.send_command
  238. service_data:
  239. entity_id: remote.mason_chromecast
  240. command: KEYCODE_DPAD_CENTER
  241. styles:
  242. card:
  243. - background: none
  244. - border-radius: 50%
  245. - box-shadow: none
  246. - height: 120px
  247. - width: 120px
  248. icon:
  249. - background: linear-gradient(145deg, #ccc, #999, #eee) !important
  250. - -webkit-background-clip: text
  251. - -webkit-text-fill-color: transparent
  252. - type: custom:button-card
  253. icon: mdi:arrow-right
  254. show_name: false
  255. tap_action:
  256. action: call-service
  257. service: remote.send_command
  258. service_data:
  259. entity_id: remote.mason_chromecast
  260. command: KEYCODE_DPAD_RIGHT
  261. styles:
  262. card:
  263. - background: none
  264. - border: none
  265. - box-shadow: none
  266. - height: 120px
  267. - width: 120px
  268. icon:
  269. - background: linear-gradient(145deg, #ccc, #999, #eee) !important
  270. - -webkit-background-clip: text
  271. - -webkit-text-fill-color: transparent
  272. - type: custom:button-card
  273. show_icon: false
  274. show_name: false
  275. styles:
  276. card:
  277. - display: none
  278. - type: custom:button-card
  279. icon: mdi:arrow-down
  280. show_name: false
  281. tap_action:
  282. action: call-service
  283. service: remote.send_command
  284. service_data:
  285. entity_id: remote.mason_chromecast
  286. command: KEYCODE_DPAD_DOWN
  287. styles:
  288. card:
  289. - background: none
  290. - border: none
  291. - box-shadow: none
  292. - height: 120px
  293. - width: 120px
  294. icon:
  295. - background: linear-gradient(145deg, #ccc, #999, #eee) !important
  296. - -webkit-background-clip: text
  297. - -webkit-text-fill-color: transparent
  298. - type: custom:button-card
  299. show_icon: false
  300. show_name: false
  301. styles:
  302. card:
  303. - display: none
  304. card_mod:
  305. style: |
  306. ha-card {
  307. display: flex;
  308. justify-content: center;
  309. padding: 0;
  310. background: none;
  311. box-shadow: none;
  312. border: none;
  313. }
  314. - type: custom:mod-card
  315. card:
  316. type: horizontal-stack
  317. cards:
  318. - type: custom:button-card
  319. icon: mdi:volume-minus
  320. show_name: false
  321. tap_action:
  322. action: call-service
  323. service: media_player.volume_down
  324. service_data:
  325. entity_id: media_player.MasonRokuTV
  326. styles:
  327. card:
  328. - background: none
  329. - box-shadow: none
  330. - border: none
  331. - height: 120px
  332. - width: 120px
  333. icon:
  334. - color: '#662d91'
  335. - type: custom:button-card
  336. icon: mdi:volume-off
  337. show_name: false
  338. tap_action:
  339. action: call-service
  340. service: media_player.volume_mute
  341. service_data:
  342. entity_id: media_player.MasonRokuTV
  343. is_volume_muted: true
  344. styles:
  345. card:
  346. - background: none
  347. - box-shadow: none
  348. - border: none
  349. - height: 120px
  350. - width: 120px
  351. icon:
  352. - color: '#662d91'
  353. - type: custom:button-card
  354. icon: mdi:volume-plus
  355. show_name: false
  356. tap_action:
  357. action: call-service
  358. service: media_player.volume_up
  359. service_data:
  360. entity_id: media_player.MasonRokuTV
  361. styles:
  362. card:
  363. - background: none
  364. - box-shadow: none
  365. - border: none
  366. - height: 120px
  367. - width: 120px
  368. icon:
  369. - color: '#662d91'
  370. card_mod:
  371. style: |
  372. ha-card {
  373. display: flex;
  374. justify-content: center;
  375. background: none;
  376. box-shadow: none;
  377. border: none;
  378. margin: 0 auto;
  379. padding: 0;
  380. }
  381.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement