Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cards:
- - cards:
- - type: 'custom:button-card'
- entity: sensor.cpu_temp
- icon: 'mdi:raspberry-pi'
- label_template: |
- return '<div align="left">' +
- '<div>' +
- '<ha-icon icon="mdi:thermometer" style="width: 12px; color: #f4e842; padding-bottom: 0px;"></ha-icon> ' +
- entity.state + '°C' +
- '</div>' +
- '</div>';
- name_template: |
- return '<div align="left" style="padding-top: 0px;">' +
- '<div style="font-weight: bold;font-size: 13px;">' + "RPI" + '</div>' +
- '<div style="margin-top: -5px;">' +
- '<ha-icon icon="mdi:server" style="width: 12px; color: #03a9f4; padding-bottom: 2px;"></ha-icon> ' +
- "CPU: " + states['sensor.processor_use'].state + '%' +
- '</div>' +
- '<div style="margin-top: -10px;">' +
- '<ha-icon icon="mdi:memory" style="width: 12px; color: #03a9f4; padding-bottom: 2px;"></ha-icon> ' +
- "RAM: " + Math.round(states['sensor.memory_use'].state) + " MB" +
- '</div>' +
- '<div style="margin-top: -10px;">' +
- '<ha-icon icon="mdi:harddisk" style="width: 12px; color: #03a9f4; padding-bottom: 2px;"></ha-icon> ' +
- "SD: " + states['sensor.disk_free_home'].state + " GB" +
- '</div>' +
- '</div>';
- state:
- - color: lime
- operator: template
- value: |
- return entity.state < '60'
- - color: orange
- operator: template
- value: |
- return entity.state < '80'
- - color: red
- operator: template
- value: |
- return entity.state > '80'
- aspect_ratio: 1/1
- color: auto
- layout: icon_label
- show_label: true
- show_state: false
- - type: 'custom:button-card'
- entity: sensor.cpu_temp
- icon: 'mdi:raspberry-pi'
- label_template: |
- return '<div align="left">' +
- '<div>' +
- '<ha-icon icon="mdi:thermometer" style="width: 12px; color: #f4e842; padding-bottom: 0px;"></ha-icon> ' +
- entity.state + '°C' +
- '</div>' +
- '</div>';
- name_template: |
- return '<div align="left" style="padding-top: 0px;">' +
- '<div style="font-weight: bold;font-size: 13px;">' + "RPI" + '</div>' +
- '<div style="margin-top: -5px;">' +
- '<ha-icon icon="mdi:server" style="width: 12px; color: #03a9f4; padding-bottom: 2px;"></ha-icon> ' +
- "CPU: " + states['sensor.processor_use'].state + '%' +
- '</div>' +
- '<div style="margin-top: -10px;">' +
- '<ha-icon icon="mdi:memory" style="width: 12px; color: #03a9f4; padding-bottom: 2px;"></ha-icon> ' +
- "RAM: " + Math.round(states['sensor.memory_use'].state) + " MB" +
- '</div>' +
- '<div style="margin-top: -10px;">' +
- '<ha-icon icon="mdi:harddisk" style="width: 12px; color: #03a9f4; padding-bottom: 2px;"></ha-icon> ' +
- "SD: " + states['sensor.disk_free_home'].state + " GB" +
- '</div>' +
- '</div>';
- state:
- - color: lime
- operator: template
- value: |
- return entity.state < '60'
- - color: orange
- operator: template
- value: |
- return entity.state < '80'
- - color: red
- operator: template
- value: |
- return entity.state > '80'
- aspect_ratio: 1/1
- color: auto
- layout: icon_label
- show_label: true
- show_state: false
- - color_type: blank-card
- type: 'custom:button-card'
- type: horizontal-stack
- type: vertical-stack
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement