Advertisement
Guest User

docker_custom_button_grid

a guest
Jul 22nd, 2021
1,128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 40.29 KB | None | 0 0
  1. type: grid
  2. title: Docker containers
  3. cards:
  4.   - custom_fields:
  5.       cpu: |
  6.        [[[
  7.           return `<ha-icon
  8.             icon="mdi:chip"
  9.             style="width: 20px; height: 20px; color: #B58E31;">
  10.             </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.docker_homeassistant_cpu'].state}%</span></span>`
  11.         ]]]
  12.       state: |
  13.        [[[
  14.           return `<ha-icon
  15.             icon="mdi:power"
  16.             style="width: 20px; height: 20px; color: #B58E31;">
  17.             </ha-icon><span> State: <span style=color: var(--text-color-sensor);>${states['sensor.docker_homeassistant_state'].state}</span></span>`
  18.         ]]]
  19.       mem: |
  20.        [[[
  21.           return `<ha-icon
  22.             icon="mdi:chip"
  23.             style="width: 20px; height: 20px; color: #B58E31;">
  24.             </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${states['sensor.docker_homeassistant_memory'].state} MB</span></span>`
  25.         ]]]
  26.       up: |
  27.        [[[
  28.           return `<ha-icon
  29.             icon="mdi:power"
  30.             style="width: 20px; height: 20px; color: #B58E31;">
  31.             </ha-icon><span> <span style=color: var(--text-color-sensor);>${states['sensor.docker_homeassistant_status'].state}</span></span>`
  32.         ]]]
  33.     entity: sensor.docker_homeassistant_state
  34.     name: home assistant
  35.     show_entity_picture: true
  36.     show_state: false
  37.     size: 70px
  38.     state:
  39.       - entity_picture: /local/images/docker_2.png
  40.         styles:
  41.           entity_picture:
  42.             - filter: grayscale(90%)
  43.         operator: default
  44.       - entity_picture: /local/images/docker_2.png
  45.         value: running
  46.     styles:
  47.       custom_fields:
  48.         cpu:
  49.           - padding-bottom: 0px
  50.           - align-self: start
  51.           - padding-left: 2px
  52.           - font-size: 12px
  53.           - justify-self: start
  54.         up:
  55.           - padding-bottom: 0px
  56.           - align-self: start
  57.           - padding-left: 2px
  58.           - font-size: 12px
  59.           - justify-self: start
  60.         mem:
  61.           - padding-bottom: 0px
  62.           - align-self: start
  63.           - padding-left: 2px
  64.           - font-size: 12px
  65.           - justify-self: start
  66.         state:
  67.           - padding-bottom: 0px
  68.           - align-self: start
  69.           - padding-left: 2px
  70.           - font-size: 12px
  71.           - justify-self: start
  72.       grid:
  73.         - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
  74.         - grid-template-columns: 1fr 1fr
  75.         - grid-template-rows: 1fr min-content min-content min-content min-content
  76.       name:
  77.         - font-weight: bold
  78.         - font-size: 16px
  79.         - color: rgb(18,154,190)
  80.         - align-self: middle
  81.         - justify-self: middle
  82.         - padding-bottom: 4px
  83.       card:
  84.         - height: 165px
  85.     tap_action:
  86.       action: call-service
  87.       service: switch.toggle
  88.       service_data:
  89.         entity_id: switch.docker_homeassistant
  90.     type: custom:button-card
  91.   - custom_fields:
  92.       cpu: |
  93.        [[[
  94.           return `<ha-icon
  95.             icon="mdi:chip"
  96.             style="width: 20px; height: 20px; color: #B58E31;">
  97.             </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.docker_organizr_cpu'].state}%</span></span>`
  98.         ]]]
  99.       state: |
  100.        [[[
  101.           return `<ha-icon
  102.             icon="mdi:power"
  103.             style="width: 20px; height: 20px; color: #B58E31;">
  104.             </ha-icon><span> State: <span style=color: var(--text-color-sensor);>${states['sensor.docker_organizr_state'].state}</span></span>`
  105.         ]]]
  106.       mem: |
  107.        [[[
  108.           return `<ha-icon
  109.             icon="mdi:chip"
  110.             style="width: 20px; height: 20px; color: #B58E31;">
  111.             </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${states['sensor.docker_organizr_memory'].state} MB</span></span>`
  112.         ]]]
  113.       up: |
  114.        [[[
  115.           return `<ha-icon
  116.             icon="mdi:power"
  117.             style="width: 20px; height: 20px; color: #B58E31;">
  118.             </ha-icon><span> <span style=color: var(--text-color-sensor);>${states['sensor.docker_organizr_status'].state}</span></span>`
  119.         ]]]
  120.     entity: sensor.docker_organizr_state
  121.     name: organizr
  122.     show_entity_picture: true
  123.     show_state: false
  124.     size: 70px
  125.     state:
  126.       - entity_picture: /local/images/docker_2.png
  127.         styles:
  128.           entity_picture:
  129.             - filter: grayscale(90%)
  130.         operator: default
  131.       - entity_picture: /local/images/docker_2.png
  132.         value: running
  133.     styles:
  134.       custom_fields:
  135.         cpu:
  136.           - padding-bottom: 0px
  137.           - align-self: start
  138.           - padding-left: 2px
  139.           - font-size: 12px
  140.           - justify-self: start
  141.         up:
  142.           - padding-bottom: 0px
  143.           - align-self: start
  144.           - padding-left: 2px
  145.           - font-size: 12px
  146.           - justify-self: start
  147.         mem:
  148.           - padding-bottom: 0px
  149.           - align-self: start
  150.           - padding-left: 2px
  151.           - font-size: 12px
  152.           - justify-self: start
  153.         state:
  154.           - padding-bottom: 0px
  155.           - align-self: start
  156.           - padding-left: 2px
  157.           - font-size: 12px
  158.           - justify-self: start
  159.       grid:
  160.         - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
  161.         - grid-template-columns: 1fr 1fr
  162.         - grid-template-rows: 1fr min-content min-content min-content min-content
  163.       name:
  164.         - font-weight: bold
  165.         - font-size: 16px
  166.         - color: rgb(18,154,190)
  167.         - align-self: middle
  168.         - justify-self: middle
  169.         - padding-bottom: 4px
  170.       card:
  171.         - height: 165px
  172.     tap_action:
  173.       action: call-service
  174.       service: switch.toggle
  175.       service_data:
  176.         entity_id: switch.docker_organizr
  177.     type: custom:button-card
  178.   - custom_fields:
  179.       cpu: |
  180.        [[[
  181.           return `<ha-icon
  182.             icon="mdi:chip"
  183.             style="width: 20px; height: 20px; color: #B58E31;">
  184.             </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.docker_node_red_cpu'].state}%</span></span>`
  185.         ]]]
  186.       state: |
  187.        [[[
  188.           return `<ha-icon
  189.             icon="mdi:power"
  190.             style="width: 20px; height: 20px; color: #B58E31;">
  191.             </ha-icon><span> State: <span style=color: var(--text-color-sensor);>${states['sensor.docker_node_red_state'].state}</span></span>`
  192.         ]]]
  193.       mem: |
  194.        [[[
  195.           return `<ha-icon
  196.             icon="mdi:chip"
  197.             style="width: 20px; height: 20px; color: #B58E31;">
  198.             </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${states['sensor.docker_node_red_memory'].state} MB</span></span>`
  199.         ]]]
  200.       up: |
  201.        [[[
  202.           return `<ha-icon
  203.             icon="mdi:power"
  204.             style="width: 20px; height: 20px; color: #B58E31;">
  205.             </ha-icon><span> <span style=color: var(--text-color-sensor);>${states['sensor.docker_node_red_status'].state}</span></span>`
  206.         ]]]
  207.     entity: sensor.docker_node_red_state
  208.     name: node_red
  209.     show_entity_picture: true
  210.     show_state: false
  211.     size: 70px
  212.     state:
  213.       - entity_picture: /local/images/docker_2.png
  214.         styles:
  215.           entity_picture:
  216.             - filter: grayscale(90%)
  217.         operator: default
  218.       - entity_picture: /local/images/docker_2.png
  219.         value: running
  220.     styles:
  221.       custom_fields:
  222.         cpu:
  223.           - padding-bottom: 0px
  224.           - align-self: start
  225.           - padding-left: 2px
  226.           - font-size: 12px
  227.           - justify-self: start
  228.         up:
  229.           - padding-bottom: 0px
  230.           - align-self: start
  231.           - padding-left: 2px
  232.           - font-size: 12px
  233.           - justify-self: start
  234.         mem:
  235.           - padding-bottom: 0px
  236.           - align-self: start
  237.           - padding-left: 2px
  238.           - font-size: 12px
  239.           - justify-self: start
  240.         state:
  241.           - padding-bottom: 0px
  242.           - align-self: start
  243.           - padding-left: 2px
  244.           - font-size: 12px
  245.           - justify-self: start
  246.       grid:
  247.         - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
  248.         - grid-template-columns: 1fr 1fr
  249.         - grid-template-rows: 1fr min-content min-content min-content min-content
  250.       name:
  251.         - font-weight: bold
  252.         - font-size: 16px
  253.         - color: rgb(18,154,190)
  254.         - align-self: middle
  255.         - justify-self: middle
  256.         - padding-bottom: 4px
  257.       card:
  258.         - height: 165px
  259.     tap_action:
  260.       action: call-service
  261.       service: switch.toggle
  262.       service_data:
  263.         entity_id: switch.docker_node_red
  264.     type: custom:button-card
  265.   - custom_fields:
  266.       cpu: |
  267.        [[[
  268.           return `<ha-icon
  269.             icon="mdi:chip"
  270.             style="width: 20px; height: 20px; color: #B58E31;">
  271.             </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.docker_mosquitto_cpu'].state}%</span></span>`
  272.         ]]]
  273.       state: |
  274.        [[[
  275.           return `<ha-icon
  276.             icon="mdi:power"
  277.             style="width: 20px; height: 20px; color: #B58E31;">
  278.             </ha-icon><span> State: <span style=color: var(--text-color-sensor);>${states['sensor.docker_mosquitto_state'].state}</span></span>`
  279.         ]]]
  280.       mem: |
  281.        [[[
  282.           return `<ha-icon
  283.             icon="mdi:chip"
  284.             style="width: 20px; height: 20px; color: #B58E31;">
  285.             </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${states['sensor.docker_mosquitto_memory'].state} MB</span></span>`
  286.         ]]]
  287.       up: |
  288.        [[[
  289.           return `<ha-icon
  290.             icon="mdi:power"
  291.             style="width: 20px; height: 20px; color: #B58E31;">
  292.             </ha-icon><span> <span style=color: var(--text-color-sensor);>${states['sensor.docker_mosquitto_status'].state}</span></span>`
  293.         ]]]
  294.     entity: sensor.docker_mosquitto_state
  295.     name: mosquitto
  296.     show_entity_picture: true
  297.     show_state: false
  298.     size: 70px
  299.     state:
  300.       - entity_picture: /local/images/docker_2.png
  301.         styles:
  302.           entity_picture:
  303.             - filter: grayscale(90%)
  304.         operator: default
  305.       - entity_picture: /local/images/docker_2.png
  306.         value: running
  307.     styles:
  308.       custom_fields:
  309.         cpu:
  310.           - padding-bottom: 0px
  311.           - align-self: start
  312.           - padding-left: 2px
  313.           - font-size: 12px
  314.           - justify-self: start
  315.         up:
  316.           - padding-bottom: 0px
  317.           - align-self: start
  318.           - padding-left: 2px
  319.           - font-size: 12px
  320.           - justify-self: start
  321.         mem:
  322.           - padding-bottom: 0px
  323.           - align-self: start
  324.           - padding-left: 2px
  325.           - font-size: 12px
  326.           - justify-self: start
  327.         state:
  328.           - padding-bottom: 0px
  329.           - align-self: start
  330.           - padding-left: 2px
  331.           - font-size: 12px
  332.           - justify-self: start
  333.       grid:
  334.         - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
  335.         - grid-template-columns: 1fr 1fr
  336.         - grid-template-rows: 1fr min-content min-content min-content min-content
  337.       name:
  338.         - font-weight: bold
  339.         - font-size: 16px
  340.         - color: rgb(18,154,190)
  341.         - align-self: middle
  342.         - justify-self: middle
  343.         - padding-bottom: 4px
  344.       card:
  345.         - height: 165px
  346.     tap_action:
  347.       action: call-service
  348.       service: switch.toggle
  349.       service_data:
  350.         entity_id: switch.docker_mosquitto
  351.     type: custom:button-card
  352.   - custom_fields:
  353.       cpu: |
  354.        [[[
  355.           return `<ha-icon
  356.             icon="mdi:chip"
  357.             style="width: 20px; height: 20px; color: #B58E31;">
  358.             </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.docker_influxdb_cpu'].state}%</span></span>`
  359.         ]]]
  360.       state: |
  361.        [[[
  362.           return `<ha-icon
  363.             icon="mdi:power"
  364.             style="width: 20px; height: 20px; color: #B58E31;">
  365.             </ha-icon><span> State: <span style=color: var(--text-color-sensor);>${states['sensor.docker_influxdb_state'].state}</span></span>`
  366.         ]]]
  367.       mem: |
  368.        [[[
  369.           return `<ha-icon
  370.             icon="mdi:chip"
  371.             style="width: 20px; height: 20px; color: #B58E31;">
  372.             </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${states['sensor.docker_influxdb_memory'].state} MB</span></span>`
  373.         ]]]
  374.       up: |
  375.        [[[
  376.           return `<ha-icon
  377.             icon="mdi:power"
  378.             style="width: 20px; height: 20px; color: #B58E31;">
  379.             </ha-icon><span> <span style=color: var(--text-color-sensor);>${states['sensor.docker_influxdb_status'].state}</span></span>`
  380.         ]]]
  381.     entity: sensor.docker_influxdb_state
  382.     name: influxdb
  383.     show_entity_picture: true
  384.     show_state: false
  385.     size: 70px
  386.     state:
  387.       - entity_picture: /local/images/docker_2.png
  388.         styles:
  389.           entity_picture:
  390.             - filter: grayscale(90%)
  391.         operator: default
  392.       - entity_picture: /local/images/docker_2.png
  393.         value: running
  394.     styles:
  395.       custom_fields:
  396.         cpu:
  397.           - padding-bottom: 0px
  398.           - align-self: start
  399.           - padding-left: 2px
  400.           - font-size: 12px
  401.           - justify-self: start
  402.         up:
  403.           - padding-bottom: 0px
  404.           - align-self: start
  405.           - padding-left: 2px
  406.           - font-size: 12px
  407.           - justify-self: start
  408.         mem:
  409.           - padding-bottom: 0px
  410.           - align-self: start
  411.           - padding-left: 2px
  412.           - font-size: 12px
  413.           - justify-self: start
  414.         state:
  415.           - padding-bottom: 0px
  416.           - align-self: start
  417.           - padding-left: 2px
  418.           - font-size: 12px
  419.           - justify-self: start
  420.       grid:
  421.         - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
  422.         - grid-template-columns: 1fr 1fr
  423.         - grid-template-rows: 1fr min-content min-content min-content min-content
  424.       name:
  425.         - font-weight: bold
  426.         - font-size: 16px
  427.         - color: rgb(18,154,190)
  428.         - align-self: middle
  429.         - justify-self: middle
  430.         - padding-bottom: 4px
  431.       card:
  432.         - height: 165px
  433.     tap_action:
  434.       action: call-service
  435.       service: switch.toggle
  436.       service_data:
  437.         entity_id: switch.docker_influxdb
  438.     type: custom:button-card
  439.   - custom_fields:
  440.       cpu: |
  441.        [[[
  442.           return `<ha-icon
  443.             icon="mdi:chip"
  444.             style="width: 20px; height: 20px; color: #B58E31;">
  445.             </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.docker_grafana_cpu'].state}%</span></span>`
  446.         ]]]
  447.       state: |
  448.        [[[
  449.           return `<ha-icon
  450.             icon="mdi:power"
  451.             style="width: 20px; height: 20px; color: #B58E31;">
  452.             </ha-icon><span> State: <span style=color: var(--text-color-sensor);>${states['sensor.docker_grafana_state'].state}</span></span>`
  453.         ]]]
  454.       mem: |
  455.        [[[
  456.           return `<ha-icon
  457.             icon="mdi:chip"
  458.             style="width: 20px; height: 20px; color: #B58E31;">
  459.             </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${states['sensor.docker_grafana_memory'].state} MB</span></span>`
  460.         ]]]
  461.       up: |
  462.        [[[
  463.           return `<ha-icon
  464.             icon="mdi:power"
  465.             style="width: 20px; height: 20px; color: #B58E31;">
  466.             </ha-icon><span> <span style=color: var(--text-color-sensor);>${states['sensor.docker_grafana_status'].state}</span></span>`
  467.         ]]]
  468.     entity: sensor.docker_grafana_state
  469.     name: grafana
  470.     show_entity_picture: true
  471.     show_state: false
  472.     size: 70px
  473.     state:
  474.       - entity_picture: /local/images/docker_2.png
  475.         styles:
  476.           entity_picture:
  477.             - filter: grayscale(90%)
  478.         operator: default
  479.       - entity_picture: /local/images/docker_2.png
  480.         value: running
  481.     styles:
  482.       custom_fields:
  483.         cpu:
  484.           - padding-bottom: 0px
  485.           - align-self: start
  486.           - padding-left: 2px
  487.           - font-size: 12px
  488.           - justify-self: start
  489.         up:
  490.           - padding-bottom: 0px
  491.           - align-self: start
  492.           - padding-left: 2px
  493.           - font-size: 12px
  494.           - justify-self: start
  495.         mem:
  496.           - padding-bottom: 0px
  497.           - align-self: start
  498.           - padding-left: 2px
  499.           - font-size: 12px
  500.           - justify-self: start
  501.         state:
  502.           - padding-bottom: 0px
  503.           - align-self: start
  504.           - padding-left: 2px
  505.           - font-size: 12px
  506.           - justify-self: start
  507.       grid:
  508.         - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
  509.         - grid-template-columns: 1fr 1fr
  510.         - grid-template-rows: 1fr min-content min-content min-content min-content
  511.       name:
  512.         - font-weight: bold
  513.         - font-size: 16px
  514.         - color: rgb(18,154,190)
  515.         - align-self: middle
  516.         - justify-self: middle
  517.         - padding-bottom: 4px
  518.       card:
  519.         - height: 165px
  520.     tap_action:
  521.       action: call-service
  522.       service: switch.toggle
  523.       service_data:
  524.         entity_id: switch.docker_grafana
  525.     type: custom:button-card
  526.   - custom_fields:
  527.       cpu: |
  528.        [[[
  529.           return `<ha-icon
  530.             icon="mdi:chip"
  531.             style="width: 20px; height: 20px; color: #B58E31;">
  532.             </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.docker_portainer_cpu'].state}%</span></span>`
  533.         ]]]
  534.       state: |
  535.        [[[
  536.           return `<ha-icon
  537.             icon="mdi:power"
  538.             style="width: 20px; height: 20px; color: #B58E31;">
  539.             </ha-icon><span> State: <span style=color: var(--text-color-sensor);>${states['sensor.docker_portainer_state'].state}</span></span>`
  540.         ]]]
  541.       mem: |
  542.        [[[
  543.           return `<ha-icon
  544.             icon="mdi:chip"
  545.             style="width: 20px; height: 20px; color: #B58E31;">
  546.             </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${states['sensor.docker_portainer_memory'].state} MB</span></span>`
  547.         ]]]
  548.       up: |
  549.        [[[
  550.           return `<ha-icon
  551.             icon="mdi:power"
  552.             style="width: 20px; height: 20px; color: #B58E31;">
  553.             </ha-icon><span> <span style=color: var(--text-color-sensor);>${states['sensor.docker_portainer_status'].state}</span></span>`
  554.         ]]]
  555.     entity: sensor.docker_portainer_state
  556.     name: portainer
  557.     show_entity_picture: true
  558.     show_state: false
  559.     size: 70px
  560.     state:
  561.       - entity_picture: /local/images/docker_2.png
  562.         styles:
  563.           entity_picture:
  564.             - filter: grayscale(90%)
  565.         operator: default
  566.       - entity_picture: /local/images/docker_2.png
  567.         value: running
  568.     styles:
  569.       custom_fields:
  570.         cpu:
  571.           - padding-bottom: 0px
  572.           - align-self: start
  573.           - padding-left: 2px
  574.           - font-size: 12px
  575.           - justify-self: start
  576.         up:
  577.           - padding-bottom: 0px
  578.           - align-self: start
  579.           - padding-left: 2px
  580.           - font-size: 12px
  581.           - justify-self: start
  582.         mem:
  583.           - padding-bottom: 0px
  584.           - align-self: start
  585.           - padding-left: 2px
  586.           - font-size: 12px
  587.           - justify-self: start
  588.         state:
  589.           - padding-bottom: 0px
  590.           - align-self: start
  591.           - padding-left: 2px
  592.           - font-size: 12px
  593.           - justify-self: start
  594.       grid:
  595.         - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
  596.         - grid-template-columns: 1fr 1fr
  597.         - grid-template-rows: 1fr min-content min-content min-content min-content
  598.       name:
  599.         - font-weight: bold
  600.         - font-size: 16px
  601.         - color: rgb(18,154,190)
  602.         - align-self: middle
  603.         - justify-self: middle
  604.         - padding-bottom: 4px
  605.       card:
  606.         - height: 165px
  607.     tap_action:
  608.       action: call-service
  609.       service: switch.toggle
  610.       service_data:
  611.         entity_id: switch.docker_portainer
  612.     type: custom:button-card
  613.   - custom_fields:
  614.       cpu: |
  615.        [[[
  616.           return `<ha-icon
  617.             icon="mdi:chip"
  618.             style="width: 20px; height: 20px; color: #B58E31;">
  619.             </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.docker_motioneye_cpu'].state}%</span></span>`
  620.         ]]]
  621.       state: |
  622.        [[[
  623.           return `<ha-icon
  624.             icon="mdi:power"
  625.             style="width: 20px; height: 20px; color: #B58E31;">
  626.             </ha-icon><span> State: <span style=color: var(--text-color-sensor);>${states['sensor.docker_motioneye_state'].state}</span></span>`
  627.         ]]]
  628.       mem: |
  629.        [[[
  630.           return `<ha-icon
  631.             icon="mdi:chip"
  632.             style="width: 20px; height: 20px; color: #B58E31;">
  633.             </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${states['sensor.docker_motioneye_memory'].state} MB</span></span>`
  634.         ]]]
  635.       up: |
  636.        [[[
  637.           return `<ha-icon
  638.             icon="mdi:power"
  639.             style="width: 20px; height: 20px; color: #B58E31;">
  640.             </ha-icon><span> <span style=color: var(--text-color-sensor);>${states['sensor.docker_motioneye_status'].state}</span></span>`
  641.         ]]]
  642.     entity: sensor.docker_motioneye_state
  643.     name: motioneye
  644.     show_entity_picture: true
  645.     show_state: false
  646.     size: 70px
  647.     state:
  648.       - entity_picture: /local/images/docker_2.png
  649.         styles:
  650.           entity_picture:
  651.             - filter: grayscale(90%)
  652.         operator: default
  653.       - entity_picture: /local/images/docker_2.png
  654.         value: running
  655.     styles:
  656.       custom_fields:
  657.         cpu:
  658.           - padding-bottom: 0px
  659.           - align-self: start
  660.           - padding-left: 2px
  661.           - font-size: 12px
  662.           - justify-self: start
  663.         up:
  664.           - padding-bottom: 0px
  665.           - align-self: start
  666.           - padding-left: 2px
  667.           - font-size: 12px
  668.           - justify-self: start
  669.         mem:
  670.           - padding-bottom: 0px
  671.           - align-self: start
  672.           - padding-left: 2px
  673.           - font-size: 12px
  674.           - justify-self: start
  675.         state:
  676.           - padding-bottom: 0px
  677.           - align-self: start
  678.           - padding-left: 2px
  679.           - font-size: 12px
  680.           - justify-self: start
  681.       grid:
  682.         - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
  683.         - grid-template-columns: 1fr 1fr
  684.         - grid-template-rows: 1fr min-content min-content min-content min-content
  685.       name:
  686.         - font-weight: bold
  687.         - font-size: 16px
  688.         - color: rgb(18,154,190)
  689.         - align-self: middle
  690.         - justify-self: middle
  691.         - padding-bottom: 4px
  692.       card:
  693.         - height: 165px
  694.     tap_action:
  695.       action: call-service
  696.       service: switch.toggle
  697.       service_data:
  698.         entity_id: switch.docker_motioneye
  699.     type: custom:button-card
  700.   - custom_fields:
  701.       cpu: |
  702.        [[[
  703.           return `<ha-icon
  704.             icon="mdi:chip"
  705.             style="width: 20px; height: 20px; color: #B58E31;">
  706.             </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.docker_doods_cpu'].state}%</span></span>`
  707.         ]]]
  708.       state: |
  709.        [[[
  710.           return `<ha-icon
  711.             icon="mdi:power"
  712.             style="width: 20px; height: 20px; color: #B58E31;">
  713.             </ha-icon><span> State: <span style=color: var(--text-color-sensor);>${states['sensor.docker_doods_state'].state}</span></span>`
  714.         ]]]
  715.       mem: |
  716.        [[[
  717.           return `<ha-icon
  718.             icon="mdi:chip"
  719.             style="width: 20px; height: 20px; color: #B58E31;">
  720.             </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${states['sensor.docker_doods_memory'].state} MB</span></span>`
  721.         ]]]
  722.       up: |
  723.        [[[
  724.           return `<ha-icon
  725.             icon="mdi:power"
  726.             style="width: 20px; height: 20px; color: #B58E31;">
  727.             </ha-icon><span> <span style=color: var(--text-color-sensor);>${states['sensor.docker_doods_status'].state}</span></span>`
  728.         ]]]
  729.     entity: sensor.docker_doods_state
  730.     name: doods
  731.     show_entity_picture: true
  732.     show_state: false
  733.     size: 70px
  734.     state:
  735.       - entity_picture: /local/images/docker_2.png
  736.         styles:
  737.           entity_picture:
  738.             - filter: grayscale(90%)
  739.         operator: default
  740.       - entity_picture: /local/images/docker_2.png
  741.         value: running
  742.     styles:
  743.       custom_fields:
  744.         cpu:
  745.           - padding-bottom: 0px
  746.           - align-self: start
  747.           - padding-left: 2px
  748.           - font-size: 12px
  749.           - justify-self: start
  750.         up:
  751.           - padding-bottom: 0px
  752.           - align-self: start
  753.           - padding-left: 2px
  754.           - font-size: 12px
  755.           - justify-self: start
  756.         mem:
  757.           - padding-bottom: 0px
  758.           - align-self: start
  759.           - padding-left: 2px
  760.           - font-size: 12px
  761.           - justify-self: start
  762.         state:
  763.           - padding-bottom: 0px
  764.           - align-self: start
  765.           - padding-left: 2px
  766.           - font-size: 12px
  767.           - justify-self: start
  768.       grid:
  769.         - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
  770.         - grid-template-columns: 1fr 1fr
  771.         - grid-template-rows: 1fr min-content min-content min-content min-content
  772.       name:
  773.         - font-weight: bold
  774.         - font-size: 16px
  775.         - color: rgb(18,154,190)
  776.         - align-self: middle
  777.         - justify-self: middle
  778.         - padding-bottom: 4px
  779.       card:
  780.         - height: 165px
  781.     tap_action:
  782.       action: call-service
  783.       service: switch.toggle
  784.       service_data:
  785.         entity_id: switch.docker_doods
  786.     type: custom:button-card
  787.   - custom_fields:
  788.       cpu: |
  789.        [[[
  790.           return `<ha-icon
  791.             icon="mdi:chip"
  792.             style="width: 20px; height: 20px; color: #B58E31;">
  793.             </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.docker_rmc_tflite_cpu'].state}%</span></span>`
  794.         ]]]
  795.       state: |
  796.        [[[
  797.           return `<ha-icon
  798.             icon="mdi:power"
  799.             style="width: 20px; height: 20px; color: #B58E31;">
  800.             </ha-icon><span> State: <span style=color: var(--text-color-sensor);>${states['sensor.docker_rmc_tflite_state'].state}</span></span>`
  801.         ]]]
  802.       mem: |
  803.        [[[
  804.           return `<ha-icon
  805.             icon="mdi:chip"
  806.             style="width: 20px; height: 20px; color: #B58E31;">
  807.             </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${states['sensor.docker_rmc_tflite_memory'].state} MB</span></span>`
  808.         ]]]
  809.       up: |
  810.        [[[
  811.           return `<ha-icon
  812.             icon="mdi:power"
  813.             style="width: 20px; height: 20px; color: #B58E31;">
  814.             </ha-icon><span> <span style=color: var(--text-color-sensor);>${states['sensor.docker_rmc_tflite_status'].state}</span></span>`
  815.         ]]]
  816.     entity: sensor.docker_rmc_tflite_state
  817.     name: deepstack light
  818.     show_entity_picture: true
  819.     show_state: false
  820.     size: 70px
  821.     state:
  822.       - entity_picture: /local/images/docker_2.png
  823.         styles:
  824.           entity_picture:
  825.             - filter: grayscale(90%)
  826.         operator: default
  827.       - entity_picture: /local/images/docker_2.png
  828.         value: running
  829.     styles:
  830.       custom_fields:
  831.         cpu:
  832.           - padding-bottom: 0px
  833.           - align-self: start
  834.           - padding-left: 2px
  835.           - font-size: 12px
  836.           - justify-self: start
  837.         up:
  838.           - padding-bottom: 0px
  839.           - align-self: start
  840.           - padding-left: 2px
  841.           - font-size: 12px
  842.           - justify-self: start
  843.         mem:
  844.           - padding-bottom: 0px
  845.           - align-self: start
  846.           - padding-left: 2px
  847.           - font-size: 12px
  848.           - justify-self: start
  849.         state:
  850.           - padding-bottom: 0px
  851.           - align-self: start
  852.           - padding-left: 2px
  853.           - font-size: 12px
  854.           - justify-self: start
  855.       grid:
  856.         - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
  857.         - grid-template-columns: 1fr 1fr
  858.         - grid-template-rows: 1fr min-content min-content min-content min-content
  859.       name:
  860.         - font-weight: bold
  861.         - font-size: 16px
  862.         - color: rgb(18,154,190)
  863.         - align-self: middle
  864.         - justify-self: middle
  865.         - padding-bottom: 4px
  866.       card:
  867.         - height: 165px
  868.     tap_action:
  869.       action: call-service
  870.       service: switch.toggle
  871.       service_data:
  872.         entity_id: switch.docker_rmc_tflite
  873.     type: custom:button-card
  874.   - custom_fields:
  875.       cpu: |
  876.        [[[
  877.           return `<ha-icon
  878.             icon="mdi:chip"
  879.             style="width: 20px; height: 20px; color: #B58E31;">
  880.             </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.docker_watchtower_cpu'].state}%</span></span>`
  881.         ]]]
  882.       state: |
  883.        [[[
  884.           return `<ha-icon
  885.             icon="mdi:power"
  886.             style="width: 20px; height: 20px; color: #B58E31;">
  887.             </ha-icon><span> State: <span style=color: var(--text-color-sensor);>${states['sensor.docker_watchtower_state'].state}</span></span>`
  888.         ]]]
  889.       mem: |
  890.        [[[
  891.           return `<ha-icon
  892.             icon="mdi:chip"
  893.             style="width: 20px; height: 20px; color: #B58E31;">
  894.             </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${states['sensor.docker_watchtower_memory'].state} MB</span></span>`
  895.         ]]]
  896.       up: |
  897.        [[[
  898.           return `<ha-icon
  899.             icon="mdi:power"
  900.             style="width: 20px; height: 20px; color: #B58E31;">
  901.             </ha-icon><span> <span style=color: var(--text-color-sensor);>${states['sensor.docker_watchtower_status'].state}</span></span>`
  902.         ]]]
  903.     entity: sensor.docker_watchtower_state
  904.     name: watchtower
  905.     show_entity_picture: true
  906.     show_state: false
  907.     size: 70px
  908.     state:
  909.       - entity_picture: /local/images/docker_2.png
  910.         styles:
  911.           entity_picture:
  912.             - filter: grayscale(90%)
  913.         operator: default
  914.       - entity_picture: /local/images/docker_2.png
  915.         value: running
  916.     styles:
  917.       custom_fields:
  918.         cpu:
  919.           - padding-bottom: 0px
  920.           - align-self: start
  921.           - padding-left: 2px
  922.           - font-size: 12px
  923.           - justify-self: start
  924.         up:
  925.           - padding-bottom: 0px
  926.           - align-self: start
  927.           - padding-left: 2px
  928.           - font-size: 12px
  929.           - justify-self: start
  930.         mem:
  931.           - padding-bottom: 0px
  932.           - align-self: start
  933.           - padding-left: 2px
  934.           - font-size: 12px
  935.           - justify-self: start
  936.         state:
  937.           - padding-bottom: 0px
  938.           - align-self: start
  939.           - padding-left: 2px
  940.           - font-size: 12px
  941.           - justify-self: start
  942.       grid:
  943.         - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
  944.         - grid-template-columns: 1fr 1fr
  945.         - grid-template-rows: 1fr min-content min-content min-content min-content
  946.       name:
  947.         - font-weight: bold
  948.         - font-size: 16px
  949.         - color: rgb(18,154,190)
  950.         - align-self: middle
  951.         - justify-self: middle
  952.         - padding-bottom: 4px
  953.       card:
  954.         - height: 165px
  955.     tap_action:
  956.       action: call-service
  957.       service: switch.toggle
  958.       service_data:
  959.         entity_id: switch.docker_watchtower
  960.     type: custom:button-card
  961.   - custom_fields:
  962.       cpu: |
  963.        [[[
  964.           return `<ha-icon
  965.             icon="mdi:chip"
  966.             style="width: 20px; height: 20px; color: #B58E31;">
  967.             </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.docker_mariadb_cpu'].state}%</span></span>`
  968.         ]]]
  969.       state: |
  970.        [[[
  971.           return `<ha-icon
  972.             icon="mdi:power"
  973.             style="width: 20px; height: 20px; color: #B58E31;">
  974.             </ha-icon><span> State: <span style=color: var(--text-color-sensor);>${states['sensor.docker_mariadb_state'].state}</span></span>`
  975.         ]]]
  976.       mem: |
  977.        [[[
  978.           return `<ha-icon
  979.             icon="mdi:chip"
  980.             style="width: 20px; height: 20px; color: #B58E31;">
  981.             </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${states['sensor.docker_mariadb_memory'].state} MB</span></span>`
  982.         ]]]
  983.       up: |
  984.        [[[
  985.           return `<ha-icon
  986.             icon="mdi:power"
  987.             style="width: 20px; height: 20px; color: #B58E31;">
  988.             </ha-icon><span> <span style=color: var(--text-color-sensor);>${states['sensor.docker_mariadb_status'].state}</span></span>`
  989.         ]]]
  990.     entity: sensor.docker_mariadb_state
  991.     name: mariadb
  992.     show_entity_picture: true
  993.     show_state: false
  994.     size: 70px
  995.     state:
  996.       - entity_picture: /local/images/docker_2.png
  997.         styles:
  998.           entity_picture:
  999.             - filter: grayscale(90%)
  1000.         operator: default
  1001.       - entity_picture: /local/images/docker_2.png
  1002.         value: running
  1003.     styles:
  1004.       custom_fields:
  1005.         cpu:
  1006.           - padding-bottom: 0px
  1007.           - align-self: start
  1008.           - padding-left: 2px
  1009.           - font-size: 12px
  1010.           - justify-self: start
  1011.         up:
  1012.           - padding-bottom: 0px
  1013.           - align-self: start
  1014.           - padding-left: 2px
  1015.           - font-size: 12px
  1016.           - justify-self: start
  1017.         mem:
  1018.           - padding-bottom: 0px
  1019.           - align-self: start
  1020.           - padding-left: 2px
  1021.           - font-size: 12px
  1022.           - justify-self: start
  1023.         state:
  1024.           - padding-bottom: 0px
  1025.           - align-self: start
  1026.           - padding-left: 2px
  1027.           - font-size: 12px
  1028.           - justify-self: start
  1029.       grid:
  1030.         - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
  1031.         - grid-template-columns: 1fr 1fr
  1032.         - grid-template-rows: 1fr min-content min-content min-content min-content
  1033.       name:
  1034.         - font-weight: bold
  1035.         - font-size: 16px
  1036.         - color: rgb(18,154,190)
  1037.         - align-self: middle
  1038.         - justify-self: middle
  1039.         - padding-bottom: 4px
  1040.       card:
  1041.         - height: 165px
  1042.     tap_action:
  1043.       action: call-service
  1044.       service: switch.toggle
  1045.       service_data:
  1046.         entity_id: switch.docker_mariadb
  1047.     type: custom:button-card
  1048.   - custom_fields:
  1049.       cpu: |
  1050.        [[[
  1051.           return `<ha-icon
  1052.             icon="mdi:chip"
  1053.             style="width: 20px; height: 20px; color: #B58E31;">
  1054.             </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.docker_znc_cpu'].state}%</span></span>`
  1055.         ]]]
  1056.       state: |
  1057.        [[[
  1058.           return `<ha-icon
  1059.             icon="mdi:power"
  1060.             style="width: 20px; height: 20px; color: #B58E31;">
  1061.             </ha-icon><span> State: <span style=color: var(--text-color-sensor);>${states['sensor.docker_znc_state'].state}</span></span>`
  1062.         ]]]
  1063.       mem: |
  1064.        [[[
  1065.           return `<ha-icon
  1066.             icon="mdi:chip"
  1067.             style="width: 20px; height: 20px; color: #B58E31;">
  1068.             </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${states['sensor.docker_znc_memory'].state} MB</span></span>`
  1069.         ]]]
  1070.       up: |
  1071.        [[[
  1072.           return `<ha-icon
  1073.             icon="mdi:power"
  1074.             style="width: 20px; height: 20px; color: #B58E31;">
  1075.             </ha-icon><span> <span style=color: var(--text-color-sensor);>${states['sensor.docker_znc_status'].state}</span></span>`
  1076.         ]]]
  1077.     entity: sensor.docker_znc_state
  1078.     name: znc
  1079.     show_entity_picture: true
  1080.     show_state: false
  1081.     size: 70px
  1082.     state:
  1083.       - entity_picture: /local/images/docker_2.png
  1084.         styles:
  1085.           entity_picture:
  1086.             - filter: grayscale(90%)
  1087.         operator: default
  1088.       - entity_picture: /local/images/docker_2.png
  1089.         value: running
  1090.     styles:
  1091.       custom_fields:
  1092.         cpu:
  1093.           - padding-bottom: 0px
  1094.           - align-self: start
  1095.           - padding-left: 2px
  1096.           - font-size: 12px
  1097.           - justify-self: start
  1098.         up:
  1099.           - padding-bottom: 0px
  1100.           - align-self: start
  1101.           - padding-left: 2px
  1102.           - font-size: 12px
  1103.           - justify-self: start
  1104.         mem:
  1105.           - padding-bottom: 0px
  1106.           - align-self: start
  1107.           - padding-left: 2px
  1108.           - font-size: 12px
  1109.           - justify-self: start
  1110.         state:
  1111.           - padding-bottom: 0px
  1112.           - align-self: start
  1113.           - padding-left: 2px
  1114.           - font-size: 12px
  1115.           - justify-self: start
  1116.       grid:
  1117.         - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
  1118.         - grid-template-columns: 1fr 1fr
  1119.         - grid-template-rows: 1fr min-content min-content min-content min-content
  1120.       name:
  1121.         - font-weight: bold
  1122.         - font-size: 16px
  1123.         - color: rgb(18,154,190)
  1124.         - align-self: middle
  1125.         - justify-self: middle
  1126.         - padding-bottom: 4px
  1127.       card:
  1128.         - height: 165px
  1129.     tap_action:
  1130.       action: call-service
  1131.       service: switch.toggle
  1132.       service_data:
  1133.         entity_id: switch.docker_znc
  1134.     type: custom:button-card
  1135.   - custom_fields:
  1136.       cpu: |
  1137.        [[[
  1138.           return `<ha-icon
  1139.             icon="mdi:thermometer"
  1140.             style="width: 20px; height: 20px; color: #B58E31;">
  1141.             </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.rpi_monitor_raspberrypi'].attributes.temp_cpu_c} &degC</span></span>`
  1142.         ]]]
  1143.       mem: |
  1144.        [[[
  1145.           return `<ha-icon
  1146.             icon="mdi:chip"
  1147.             style="width: 20px; height: 20px; color: #B58E31;">
  1148.             </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${Math.round(states['sensor.rpi_monitor_raspberrypi'].attributes.memory.size_mb - states['sensor.rpi_monitor_raspberrypi'].attributes.memory.free_mb)} MB</span></span>`
  1149.         ]]]
  1150.       up: |
  1151.        [[[
  1152.           return `<ha-icon
  1153.             icon="mdi:power"
  1154.             style="width: 20px; height: 20px; color: #B58E31;">
  1155.             </ha-icon><span> Up <span style=color: var(--text-color-sensor);>${states['sensor.rpi_monitor_raspberrypi'].attributes.up_time} hours</span></span>`
  1156.         ]]]
  1157.     entity: sensor.rpi_monitor_raspberrypi
  1158.     name: rpi4
  1159.     show_entity_picture: true
  1160.     show_state: false
  1161.     size: 40px
  1162.     entity_picture: /local/images/raspberry_logo.png
  1163.     styles:
  1164.       custom_fields:
  1165.         cpu:
  1166.           - padding-bottom: 0px
  1167.           - align-self: start
  1168.           - padding-left: 2px
  1169.           - font-size: 12px
  1170.           - justify-self: start
  1171.         up:
  1172.           - padding-bottom: 0px
  1173.           - align-self: start
  1174.           - padding-left: 2px
  1175.           - font-size: 12px
  1176.           - justify-self: start
  1177.         mem:
  1178.           - padding-bottom: 0px
  1179.           - align-self: start
  1180.           - padding-left: 2px
  1181.           - font-size: 12px
  1182.           - justify-self: start
  1183.         state:
  1184.           - padding-bottom: 0px
  1185.           - align-self: start
  1186.           - padding-left: 2px
  1187.           - font-size: 12px
  1188.           - justify-self: start
  1189.       grid:
  1190.         - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
  1191.         - grid-template-columns: 1fr 1fr
  1192.         - grid-template-rows: 1fr min-content min-content min-content min-content
  1193.       name:
  1194.         - font-weight: bold
  1195.         - font-size: 16px
  1196.         - color: rgb(18,154,190)
  1197.         - align-self: middle
  1198.         - justify-self: middle
  1199.         - padding-bottom: 4px
  1200.       card:
  1201.         - height: 165px
  1202.     tap_action:
  1203.       action: more-info
  1204.     type: custom:button-card
  1205.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement