Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: custom:auto-entities
- card:
- type: grid
- card_param: cards
- filter:
- include:
- - entity_id: sensor.docker_*_state
- options:
- custom_fields:
- cpu: |
- [[[
- return `<ha-icon
- icon="mdi:chip"
- style="width: 20px; height: 20px; color: #B58E31;">
- </ha-icon><span> CPU: <span style=color: var(--text-color-sensor);>${states['sensor.docker_homeassistant_cpu'].state}%</span></span>`
- ]]]
- state: |
- [[[
- return `<ha-icon
- icon="mdi:power"
- style="width: 20px; height: 20px; color: #B58E31;">
- </ha-icon><span> State: <span style=color: var(--text-color-sensor);>${states['sensor.docker_homeassistant_state'].state}</span></span>`
- ]]]
- mem: |
- [[[
- return `<ha-icon
- icon="mdi:chip"
- style="width: 20px; height: 20px; color: #B58E31;">
- </ha-icon><span> RAM: <span style=color: var(--text-color-sensor);>${states['sensor.docker_homeassistant_memory'].state} MB</span></span>`
- ]]]
- up: |
- [[[
- return `<ha-icon
- icon="mdi:power"
- style="width: 20px; height: 20px; color: #B58E31;">
- </ha-icon><span> <span style=color: var(--text-color-sensor);>${states['sensor.docker_homeassistant_status'].state}</span></span>`
- ]]]
- show_entity_picture: true
- show_state: false
- size: 70px
- state:
- - entity_picture: /local/images/docker_2.png
- styles:
- entity_picture:
- - filter: grayscale(90%)
- operator: default
- - entity_picture: /local/images/docker_2.png
- value: running
- styles:
- custom_fields:
- cpu:
- - padding-bottom: 0px
- - align-self: start
- - padding-left: 2px
- - font-size: 12px
- - justify-self: start
- up:
- - padding-bottom: 0px
- - align-self: start
- - padding-left: 2px
- - font-size: 12px
- - justify-self: start
- mem:
- - padding-bottom: 0px
- - align-self: start
- - padding-left: 2px
- - font-size: 12px
- - justify-self: start
- state:
- - padding-bottom: 0px
- - align-self: start
- - padding-left: 2px
- - font-size: 12px
- - justify-self: start
- grid:
- - grid-template-areas: '"i i" "n n" "state state" "up up" "cpu cpu" "mem mem"'
- - grid-template-columns: 1fr 1fr
- - grid-template-rows: 1fr min-content min-content min-content min-content
- name:
- - font-weight: bold
- - font-size: 16px
- - color: rgb(18,154,190)
- - align-self: middle
- - justify-self: middle
- - padding-bottom: 4px
- card:
- - height: 165px
- tap_action:
- action: call-service
- service: switch.toggle
- service_data:
- entity_id: switch.docker_homeassistant
- type: custom:button-card
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement