Advertisement
AalianKhan

Button template for room card

Feb 18th, 2023 (edited)
2,026
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 24.64 KB | None | 0 0
  1. button_card_templates:
  2.   card_room:
  3.     template:
  4.      - ulm_translation_engine
  5.     variables:
  6.       label_use_temperature: true
  7.       label_use_brightness: false
  8.     double_tap_action:
  9.       action: call-service
  10.       service: input_select.select_option
  11.       service_data:
  12.         option: '[[[ return variables.ulm_input_select_option ]]]'
  13.         entity_id: '[[[ return variables.ulm_input_select ]]]'
  14.     color: var(--google-grey-500)
  15.     size: 45%
  16.     aspect_ratio: 1/1
  17.     show_icon: true
  18.     show_label: true
  19.     show_name: true
  20.     icon: mdi:sofa-single
  21.     label: |-
  22.       [[[
  23.         if (variables.label_use_temperature) {
  24.           return (entity?.attributes?.current_temperature || entity?.attributes?.temperature || entity?.attributes?.device_temperature || entity?.state || '-') + (entity?.attributes?.unit_of_measurement || '°C');
  25.         } else if (variables.label_use_brightness && entity?.state == "on" && entity?.attributes?.brightness != null) {
  26.           let bri = Math.round(entity?.attributes?.brightness / 2.55);
  27.           return (bri ? bri : "0") + "%";
  28.         }
  29.         return variables.ulm_translation_state;
  30.       ]]]
  31.     state:
  32.       - value: unavailable
  33.         styles:
  34.           custom_fields:
  35.             notification:
  36.               - border-radius: 50%
  37.               - border: 2px solid var(--card-background-color)
  38.               - width: 24.5px
  39.               - height: 24.5px
  40.               - position: absolute
  41.               - left: 50%
  42.               - top: 50%
  43.               - transform: translate(-50%,-50%)
  44.               - margin-top: 35%
  45.               - margin-left: '-35%'
  46.               - line-height: 0
  47.               - display: grid
  48.               - background-color: '[[[ return ''rgba(var(--color-red),1)''; ]]]'
  49.     styles:
  50.       icon:
  51.         - color: rgba(var(--color-theme),0.2)
  52.       label:
  53.         - justify-self: start
  54.         - align-self: start
  55.         - font-weight: bold
  56.         - font-size: 14px
  57.         - filter: opacity(40%)
  58.         - margin-left: 12px
  59.         - max-width: >-
  60.             [[[ return `calc(100% - (12px + ${!variables?.entity_1 &&
  61.             !variables?.entity_2 ? 5 : 0}px))`; ]]]
  62.         - text-overflow: ellipsis
  63.         - overflow: hidden
  64.         - margin-top: '[[[ return !variables?.entity_1 ? ''-24%'' : ''-10%''; ]]]'
  65.       name:
  66.         - justify-self: start
  67.         - align-self: end
  68.         - font-weight: bold
  69.         - font-size: 18px
  70.         - margin-left: 12px
  71.         - margin-bottom: >-
  72.             [[[ return !variables?.entity_1 ? (!variables?.entity_2 ? '15.8%' :
  73.             '24%') : '10%'; ]]]
  74.         - max-width: >-
  75.             [[[ return `calc(100% - (12px + ${!variables?.entity_2 ? 5 :
  76.             0}px))`; ]]]
  77.         - text-overflow: ellipsis
  78.         - overflow: hidden
  79.       state:
  80.         - justify-self: start
  81.         - font-weight: bold
  82.         - font-size: 12px
  83.         - filter: opacity(40%)
  84.         - margin-left: 6px
  85.       img_cell:
  86.         - background-color: rgba(var(--color-theme),0.05)
  87.         - border-radius: 50%
  88.         - width: 75%
  89.         - height: 75%
  90.         - max-width: none
  91.         - max-height: none
  92.         - position: absolute
  93.         - left: 50%
  94.         - top: 50%
  95.         - transform: translate(-50%,-50%)
  96.         - margin-top: 25%
  97.         - margin-left: '-25%'
  98.       grid:
  99.         - grid-template-areas: >-
  100.             [[[ return !variables?.entity_1 ? (!variables?.entity_2 ? `'n n n'
  101.             'l l i3' 'i i i4'` : `'n n i2' 'l l i3' 'i i i4'`) : `'n n n i1' 'l
  102.             l l i2' 'i i . i3' 'i i . i4'`; ]]]
  103.         - grid-template-columns: >-
  104.             [[[ return !variables?.entity_1 ? '1fr 1fr 1fr' : '1fr 1fr 1fr 1fr';
  105.             ]]]
  106.         - grid-template-rows: >-
  107.             [[[ return !variables?.entity_1 ? '1fr 1fr 1fr' : '1fr 1fr 1fr 1fr';
  108.             ]]]
  109.         - justify-items: center
  110.       card:
  111.         - border-radius: 20px
  112.         - box-shadow: var(--box-shadow)
  113.         - padding: 5px
  114.       custom_fields:
  115.         i1:
  116.           - border-radius: 50%
  117.           - width: 80%
  118.           - height: 80%
  119.           - line-height: 0
  120.           - display: grid
  121.         i2:
  122.           - border-radius: 50%
  123.           - width: 80%
  124.           - height: 80%
  125.           - line-height: 0
  126.           - display: grid
  127.         i3:
  128.           - border-radius: 50%
  129.           - width: 80%
  130.           - height: 80%
  131.           - line-height: 0
  132.           - display: grid
  133.         i4:
  134.           - border-radius: 50%
  135.           - width: 80%
  136.           - height: 80%
  137.           - line-height: 0
  138.           - display: grid
  139.     custom_fields:
  140.       notification: |
  141.        [[[
  142.           if (entity?.state == 'unavailable'){
  143.             return '<ha-icon icon="mdi:exclamation" style="width: 50%; height: 50%; color: var(--primary-background-color);"></ha-icon>';
  144.           }
  145.         ]]]
  146.       i1:
  147.         card:
  148.           type: custom:button-card
  149.           template: |
  150.            [[[
  151.               let templates = [ 'widget_icon_room' ];
  152.               if (variables?.entity_1?.templates?.length) {
  153.                 templates.push(...variables.entity_1.templates);
  154.               }
  155.               return templates;
  156.             ]]]
  157.           variables: '[[[ return variables?.entity_1; ]]]'
  158.           state:
  159.             - operator: template
  160.               value: '[[[ return !variables.entity_1; ]]]'
  161.               styles:
  162.                 card:
  163.                   - display: none
  164.           entity: '[[[ return variables?.entity_1?.entity_id; ]]]'
  165.       i2:
  166.         card:
  167.           type: custom:button-card
  168.           template: |
  169.            [[[
  170.               let templates = [ 'widget_icon_room' ];
  171.               if (variables?.entity_2?.templates?.length) {
  172.                 templates.push(...variables.entity_2.templates);
  173.               }
  174.               return templates;
  175.             ]]]
  176.           variables: '[[[ return variables?.entity_2; ]]]'
  177.           state:
  178.             - operator: template
  179.               value: '[[[ return !variables.entity_2; ]]]'
  180.               styles:
  181.                 card:
  182.                   - display: none
  183.           entity: '[[[ return variables?.entity_2?.entity_id; ]]]'
  184.       i3:
  185.         card:
  186.           type: custom:button-card
  187.           template: |
  188.            [[[
  189.               let templates = [ 'widget_icon_room' ];
  190.               if (variables?.entity_3?.templates?.length) {
  191.                 templates.push(...variables.entity_3.templates);
  192.               }
  193.               return templates;
  194.             ]]]
  195.           variables: '[[[ return variables?.entity_3; ]]]'
  196.           state:
  197.             - operator: template
  198.               value: '[[[ return !variables.entity_3; ]]]'
  199.               styles:
  200.                 card:
  201.                   - display: none
  202.           entity: '[[[ return variables?.entity_3?.entity_id; ]]]'
  203.       i4:
  204.         card:
  205.           type: custom:button-card
  206.           template: |
  207.            [[[
  208.               let templates = [ 'widget_icon_room' ];
  209.               if (variables?.entity_4?.templates?.length) {
  210.                 templates.push(...variables.entity_4.templates);
  211.               }
  212.               return templates;
  213.             ]]]
  214.           variables: '[[[ return variables?.entity_4; ]]]'
  215.           state:
  216.             - operator: template
  217.               value: '[[[ return !variables.entity_4; ]]]'
  218.               styles:
  219.                 card:
  220.                   - display: none
  221.           entity: '[[[ return variables?.entity_4?.entity_id; ]]]'
  222.   widget_icon_room:
  223.     variables:
  224.       tap_action:
  225.         action: toggle
  226.       hold_action:
  227.         action: more-info
  228.     tap_action:
  229.       action: >-
  230.         [[[ return variables?.tap_action?.action ? variables.tap_action.action :
  231.        'none'; ]]]
  232.       entity: '[[[ return variables.tap_action.entity; ]]]'
  233.       navigation_path: '[[[ return variables.tap_action.navigation_path; ]]]'
  234.       url_path: '[[[ return variables.tap_action.url_path; ]]]'
  235.       service: '[[[ return variables.tap_action.service; ]]]'
  236.       service_data: '[[[ return variables.tap_action.service_data; ]]]'
  237.     hold_action:
  238.       action: >-
  239.         [[[ return variables?.hold_action?.action ? variables.hold_action.action
  240.         : 'none'; ]]]
  241.       entity: '[[[ return variables.hold_action.entity; ]]]'
  242.       navigation_path: '[[[ return variables.hold_action.navigation_path; ]]]'
  243.       url_path: '[[[ return variables.hold_action.url_path; ]]]'
  244.       service: '[[[ return variables.hold_action.service; ]]]'
  245.       service_data: '[[[ return variables.hold_action.service_data; ]]]'
  246.     size: 15px
  247.     color: var(--google-grey)
  248.     show_icon: true
  249.     show_name: false
  250.     styles:
  251.       icon:
  252.         - width: 50%
  253.         - height: 50%
  254.         - line-height: '0'
  255.         - color: rgba(var(--color-theme),0.2)
  256.       img_cell:
  257.         - border-radius: 50%
  258.         - background-color: rgba(var(--color-theme),0.05)
  259.       grid:
  260.         - grid-template-areas: '''i'''
  261.       card:
  262.         - height: 100%
  263.         - box-shadow: none
  264.         - padding: 0px
  265.         - border-radius: 50%
  266.   ulm_translation_engine:
  267.     variables:
  268.       ulm_translation_back: '[[[ return hass.resources[hass[''language'']][''ui.common.back'']; ]]]'
  269.       ulm_translation_brightness: >-
  270.         [[[ return hass.resources[hass['language']]['ui.card.light.brightness'];
  271.         ]]]
  272.       ulm_translation_color_temperature: >-
  273.         [[[ return
  274.         hass.resources[hass['language']]['ui.card.light.color_temperature']; ]]]
  275.       ulm_translation_status: >-
  276.         [[[ return
  277.         hass.resources[hass['language']]['ui.dialogs.more_info_control.vacuum.status'];
  278.         ]]]
  279.       ulm_translation_scenes: >-
  280.         [[[ return
  281.         hass.resources[hass['language']]['ui.dialogs.quick-bar.commands.reload.scene'];
  282.         ]]]
  283.       ulm_translation_source: >-
  284.         [[[ return
  285.         hass.resources[hass['language']]['ui.card.media_player.source']; ]]]
  286.       ulm_translation_history: >-
  287.         [[[ return
  288.         hass.resources[hass['language']]['ui.dialogs.more_info_control.history'];
  289.         ]]]
  290.       ulm_translation_close_cover: >-
  291.         [[[ return
  292.         hass.resources[hass['language']]['ui.dialogs.more_info_control.cover.close_cover'];
  293.         ]]]
  294.       ulm_translation_stop_cover: >-
  295.         [[[ return
  296.         hass.resources[hass['language']]['ui.dialogs.more_info_control.cover.stop_cover'];
  297.         ]]]
  298.       ulm_translation_open_cover: >-
  299.         [[[ return
  300.         hass.resources[hass['language']]['ui.dialogs.more_info_control.cover.open_cover'];
  301.         ]]]
  302.       ulm_translation_more_options: >-
  303.         [[[ return
  304.         hass.resources[hass['language']]['ui.panel.lovelace.editor.edit_card.options'];
  305.         ]]]
  306.       ulm_translation_hour: |
  307.        [[[
  308.           var number = hass.resources[hass['language']]["ui.duration.hour"];
  309.           var matches = number.match(/[^{\}]+(?=})/g);
  310.           var hour = "Hour";
  311.           if (matches) {
  312.             var hour = matches[1];
  313.           }
  314.           return(hour);
  315.         ]]]
  316.       ulm_translation_hours: |
  317.        [[[
  318.           var number = hass.resources[hass['language']]["ui.duration.hour"];
  319.           var matches = number.match(/[^{\}]+(?=})/g);
  320.           var hour = "Hours";
  321.           if (matches) {
  322.             var hour = matches[2];
  323.           }
  324.           return(hour);
  325.         ]]]
  326.       ulm_translation_hvac: |
  327.        [[[
  328.           if (typeof(entity) !== 'undefined' && entity !== undefined){
  329.             let state = entity.state;
  330.             let d_class = entity.attributes.device_class;
  331.             let def = ["unknown", "unavailable"];
  332.             let lang = hass["language"];
  333.             let action = entity.attributes.hvac_action;
  334.             let domain = entity.entity_id.substr(0, entity.entity_id.indexOf("."));
  335.             var mode = hass.resources[lang]["state_attributes." + domain + ".hvac_action." + action];
  336.             if (def.includes(state)) {
  337.               var mode = hass.resources[lang]["state.default." + state ];
  338.             }
  339.             var label = hass.resources[lang]["component." + domain + ".state._." + state];
  340.             var translation = label ? label : state;
  341.             return (entity.attributes.current_temperature ) + '°' + ' • ' + translation + ((entity.state !='off' && mode !== undefined) ? ' (' + mode + ')' : '');
  342.             }
  343.         ]]]
  344.       ulm_translation_off: '[[[ return hass.resources[hass[''language'']][''state.default.off'']; ]]]'
  345.       ulm_translation_on: '[[[ return hass.resources[hass[''language'']][''state.default.on'']; ]]]'
  346.       ulm_translation_state: |
  347.        [[[
  348.           if (typeof(entity) !== 'undefined' && entity !== undefined){
  349.             let state = entity.state;
  350.             let d_class = entity.attributes.device_class;
  351.             let def = ["unknown", "unavailable"];
  352.             let lang = hass["language"];
  353.             let domain = entity.entity_id.substr(0, entity.entity_id.indexOf("."));
  354.             var translation = hass.resources[lang]["component." + domain + ".state._." + state]
  355.             if (def.includes(state)) {
  356.               var translation = hass.resources[lang]["state.default." + state ];
  357.             }
  358.             else if (domain == "binary_sensor" && d_class != ''){
  359.               var translation = hass.resources[lang]["component." + domain + ".state." + d_class + "." + state]
  360.             }
  361.             return translation ? translation : state;
  362.           }
  363.         ]]]
  364.       ulm_translation_state_reverse: |
  365.        [[[
  366.           if (typeof(entity) !== 'undefined' && entity !== undefined){
  367.             let state = entity.state;
  368.             let def = ["unknown", "unavailable"];
  369.             let lang = hass["language"];
  370.             if (state === "on"){
  371.               var translation = hass.resources[lang]["state.default.off"];
  372.             } else if (state === "off"){
  373.               var translation = hass.resources[lang]["state.default.on"];
  374.             }
  375.             if (def.includes(state)) {
  376.               var translation = hass.resources[lang]["state.default." + state ];
  377.             }
  378.             return translation ? translation : state;
  379.           }
  380.         ]]]
  381.       ulm_translation_state_unit: |
  382.        [[[
  383.           if (typeof(entity) !== 'undefined' && entity !== undefined){
  384.             let state = entity.state;
  385.             let d_class = entity.attributes.device_class;
  386.             let def = ["unknown", "unavailable"];
  387.             let lang = hass["language"];
  388.             let domain = entity.entity_id.substr(0, entity.entity_id.indexOf("."));
  389.             let unit = entity.attributes.unit_of_measurement != null ? " " + entity.attributes.unit_of_measurement : "";
  390.  
  391.             if(hass.resources[lang]["component." + domain + ".state._." + state]){
  392.             var translation = hass.resources[lang]["component." + domain + ".state._." + state] + unit
  393.             } else {
  394.             var translation =  state + unit;
  395.             }
  396.             if (def.includes(state)) {
  397.               var translation = hass.resources[lang]["state.default." + state ];
  398.             }
  399.             else if (domain == "binary_sensor" && d_class != ''){
  400.               var translation = hass.resources[lang]["component." + domain + ".state." + d_class + "." + state]
  401.             }
  402.             else if (domain == "media_player" && d_class != ''){
  403.               if (state == 'idle' || state == 'paused')
  404.                 var translation = hass.resources[lang]["component." + domain + ".state." + state];
  405.               else {
  406.                 var translation = (entity.attributes.source) + ' • ' +  ( Math.round(entity.attributes.volume_level / 0.01)) + '%' ;
  407.               }
  408.             }
  409.             return translation ? translation : state;
  410.           }
  411.         ]]]
  412.       ulm_translation_statistics: >-
  413.         [[[ return
  414.         hass.resources[hass['language']]['ui.components.statistic-picker.statistic'];
  415.         ]]]
  416.       ulm_translation_unavailable: >-
  417.         [[[ return
  418.         hass.resources[hass['language']]['state.default.unavailable']; ]]]
  419.       ulm_translation_currency: |
  420.        [[[
  421.           var hasscurrency = hass.config["currency"];
  422.           var currency =
  423.           { "AFA": "؋",
  424.             "ALL": "Lek",
  425.             "DZD": "دج",
  426.             "AOA": "Kz",
  427.             "ARS": "$",
  428.             "AMD": "֏",
  429.             "AWG": "ƒ",
  430.             "AUD": "$",
  431.             "AZN": "m",
  432.             "BSD": "B$",
  433.             "BHD": ".د.ب",
  434.             "BDT": "৳",
  435.             "BBD": "Bds$",
  436.             "BYR": "Br",
  437.             "BEF": "fr",
  438.             "BZD": "$",
  439.             "BMD": "$",
  440.             "BTN": "Nu.",
  441.             "BTC": "฿",
  442.             "BOB": "Bs.",
  443.             "BAM": "KM",
  444.             "BWP": "P",
  445.             "BRL": "R$",
  446.             "GBP": "£",
  447.             "BND": "B$",
  448.             "BGN": "Лв.",
  449.             "BIF": "FBu",
  450.             "KHR": "KHR",
  451.             "CAD": "$",
  452.             "CVE": "$",
  453.             "KYD": "$",
  454.             "XOF": "CFA",
  455.             "XAF": "FCFA",
  456.             "XPF": "₣",
  457.             "CLP": "$",
  458.             "CNY": "¥",
  459.             "COP": "$",
  460.             "KMF": "CF",
  461.             "CDF": "FC",
  462.             "CRC": "₡",
  463.             "HRK": "kn",
  464.             "CUC": "$, CUC",
  465.             "CZK": "Kč",
  466.             "DKK": "Kr.",
  467.             "DJF": "Fdj",
  468.             "DOP": "$",
  469.             "XCD": "$",
  470.             "EGP": "ج.م",
  471.             "ERN": "Nfk",
  472.             "EEK": "kr",
  473.             "ETB": "Nkf",
  474.             "EUR": "€",
  475.             "FKP": "£",
  476.             "FJD": "FJ$",
  477.             "GMD": "D",
  478.             "GEL": "ლ",
  479.             "DEM": "DM",
  480.             "GHS": "GH₵",
  481.             "GIP": "£",
  482.             "GRD": "₯, Δρχ, Δρ",
  483.             "GTQ": "Q",
  484.             "GNF": "FG",
  485.             "GYD": "$",
  486.             "HTG": "G",
  487.             "HNL": "L",
  488.             "HKD": "$",
  489.             "HUF": "Ft",
  490.             "ISK": "kr",
  491.             "INR": "₹",
  492.             "IDR": "Rp",
  493.             "IRR": "﷼",
  494.             "IQD": "د.ع",
  495.             "ILS": "₪",
  496.             "ITL": "L,£",
  497.             "JMD": "J$",
  498.             "JPY": "¥",
  499.             "JOD": "ا.د",
  500.             "KZT": "лв",
  501.             "KES": "KSh",
  502.             "KWD": "ك.د",
  503.             "KGS": "лв",
  504.             "LAK": "₭",
  505.             "LVL": "Ls",
  506.             "LBP": "£",
  507.             "LSL": "L",
  508.             "LRD": "$",
  509.             "LYD": "د.ل",
  510.             "LTL": "Lt",
  511.             "MOP": "$",
  512.             "MKD": "ден",
  513.             "MGA": "Ar",
  514.             "MWK": "MK",
  515.             "MYR": "RM",
  516.             "MVR": "Rf",
  517.             "MRO": "MRU",
  518.             "MUR": "₨",
  519.             "MXN": "$",
  520.             "MDL": "L",
  521.             "MNT": "₮",
  522.             "MAD": "MAD",
  523.             "MZM": "MT",
  524.             "MMK": "K",
  525.             "NAD": "$",
  526.             "NPR": "₨",
  527.             "ANG": "ƒ",
  528.             "TWD": "$",
  529.             "NZD": "$",
  530.             "NIO": "C$",
  531.             "NGN": "₦",
  532.             "KPW": "₩",
  533.             "NOK": "kr",
  534.             "OMR": ".ع.ر",
  535.             "PKR": "₨",
  536.             "PAB": "B/.",
  537.             "PGK": "K",
  538.             "PYG": "₲",
  539.             "PEN": "S/.",
  540.             "PHP": "₱",
  541.             "PLN": "zł",
  542.             "QAR": "ق.ر",
  543.             "RON": "lei",
  544.             "RUB": "₽",
  545.             "RWF": "FRw",
  546.             "SVC": "₡",
  547.             "WST": "SAT",
  548.             "SAR": "﷼",
  549.             "RSD": "din",
  550.             "SCR": "SRe",
  551.             "SLL": "Le",
  552.             "SGD": "$",
  553.             "SKK": "Sk",
  554.             "SBD": "Si$",
  555.             "SOS": "Sh.so.",
  556.             "ZAR": "R",
  557.             "KRW": "₩",
  558.             "XDR": "SDR",
  559.             "LKR": "Rs",
  560.             "SHP": "£",
  561.             "SDG": ".س.ج",
  562.             "SRD": "$",
  563.             "SZL": "E",
  564.             "SEK": "kr",
  565.             "CHF": "CHf",
  566.             "SYP": "LS",
  567.             "STD": "Db",
  568.             "TJS": "SM",
  569.             "TZS": "TSh",
  570.             "THB": "฿",
  571.             "TOP": "$",
  572.             "TTD": "$",
  573.             "TND": "ت.د",
  574.             "TRY": "₺",
  575.             "TMT": "T",
  576.             "UGX": "USh",
  577.             "UAH": "₴",
  578.             "AED": "إ.د",
  579.             "UYU": "$",
  580.             "USD": "$",
  581.             "UZS": "лв",
  582.             "VUV": "VT",
  583.             "VEF": "Bs",
  584.             "VND": "₫",
  585.             "YER": "﷼",
  586.             "ZMK": "ZK"
  587.           }
  588.           return currency[hasscurrency];
  589.         ]]]
  590.   blue_no_state:
  591.     styles:
  592.       icon:
  593.         - color: "rgba(var(--color-blue),1)"
  594.       label:
  595.         - color: "rgba(var(--color-blue-text),1)"
  596.       name:
  597.         - color: "rgba(var(--color-blue-text),1)"
  598.       img_cell:
  599.         - background-color: "rgba(var(--color-blue), 0.2)"
  600.       card:
  601.         - background-color: "rgba(var(--color-background-blue), var(--opacity-bg))"
  602.   green_no_state:
  603.     styles:
  604.       icon:
  605.         - color: "rgba(var(--color-green),1)"
  606.       label:
  607.         - color: "rgba(var(--color-green-text),1)"
  608.       name:
  609.         - color: "rgba(var(--color-green-text),1)"
  610.       img_cell:
  611.         - background-color: "rgba(var(--color-green), 0.2)"
  612.   grey_no_state:
  613.     styles:
  614.       icon:
  615.         - color: "rgba(var(--color-grey),1)"
  616.       label:
  617.         - color: "rgba(var(--color-grey-text),1)"
  618.       name:
  619.         - color: "rgba(var(--color-grey-text),1)"
  620.       img_cell:
  621.         - background-color: "rgba(var(--color-grey), 0.2)"
  622.   pink_no_state:
  623.     styles:
  624.       icon:
  625.         - color: "rgba(var(--color-pink),1)"
  626.       label:
  627.         - color: "rgba(var(--color-pink-text),1)"
  628.       name:
  629.         - color: "rgba(var(--color-pink-text),1)"
  630.       img_cell:
  631.         - background-color: "rgba(var(--color-pink), 0.2)"
  632.   purple_no_state:
  633.     styles:
  634.       icon:
  635.         - color: "rgba(var(--color-purple),1)"
  636.       label:
  637.         - color: "rgba(var(--color-purple-text),1)"
  638.       name:
  639.         - color: "rgba(var(--color-purple-text),1)"
  640.       img_cell:
  641.         - background-color: "rgba(var(--color-purple), 0.2)"
  642.   red_no_state:
  643.     styles:
  644.       icon:
  645.         - color: rgba(var(--color-red),1)
  646.       label:
  647.         - color: rgba(var(--color-red-text),1)
  648.       name:
  649.         - color: rgba(var(--color-red-text),1)
  650.       img_cell:
  651.         - background-color: rgba(var(--color-red), 0.2)
  652.   yellow_no_state:
  653.     styles:
  654.       icon:
  655.         - color: "rgba(var(--color-yellow),1)"
  656.       label:
  657.         - color: "rgba(var(--color-yellow-text),1)"
  658.       name:
  659.         - color: "rgba(var(--color-yellow-text),1)"
  660.       img_cell:
  661.         - background-color: "rgba(var(--color-yellow), 0.2)"
  662.   red_off:
  663.     state:
  664.       - styles:
  665.           icon:
  666.             - color: rgba(var(--color-red),1)
  667.           label:
  668.             - color: rgba(var(--color-red-text),1)
  669.           name:
  670.             - color: rgba(var(--color-red-text),1)
  671.           img_cell:
  672.             - background-color: rgba(var(--color-red), 0.2)
  673.         value: 'off'
  674.         id: 'off'
  675.   yellow_on:
  676.     state:
  677.       - styles:
  678.           icon:
  679.             - color: rgba(var(--color-yellow),1)
  680.           label:
  681.             - color: rgba(var(--color-yellow-text),1)
  682.           name:
  683.             - color: rgba(var(--color-yellow-text),1)
  684.           img_cell:
  685.             - background-color: rgba(var(--color-yellow), 0.2)
  686.           card:
  687.             - background-color: rgba(var(--color-background-yellow),var(--opacity-bg))
  688.         value: 'on'
  689.         id: 'on'
  690.   blue_on:
  691.     state:
  692.       - styles:
  693.           icon:
  694.             - color: rgba(var(--color-blue),1)
  695.           label:
  696.             - color: rgba(var(--color-blue-text),1)
  697.           name:
  698.             - color: rgba(var(--color-blue-text),1)
  699.           img_cell:
  700.             - background-color: rgba(var(--color-blue), 0.2)
  701.           card:
  702.             - background-color: rgba(var(--color-background-blue), var(--opacity-bg))
  703.         id: 'on'
  704.         value: 'on'
  705.   green_on:
  706.     state:
  707.       - styles:
  708.           icon:
  709.             - color: rgba(var(--color-green),1)
  710.           label:
  711.             - color: rgba(var(--color-green-text),1)
  712.           name:
  713.             - color: rgba(var(--color-green-text),1)
  714.           img_cell:
  715.             - background-color: rgba(var(--color-green), 0.2)
  716.           card:
  717.             - background-color: rgba(var(--color-background-green), var(--opacity-bg))
  718.         value: 'on'
  719.         id: 'on'
  720.   pink_on:
  721.     state:
  722.       - styles:
  723.           icon:
  724.             - color: rgba(var(--color-pink),1)
  725.           label:
  726.             - color: rgba(var(--color-pink-text),1)
  727.           name:
  728.             - color: rgba(var(--color-pink-text),1)
  729.           img_cell:
  730.             - background-color: rgba(var(--color-pink), 0.2)
  731.         value: 'on'
  732.         id: 'on'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement