效果预览
代码
- type: custom:layout-card #添加主页显示参数数据#
layout type: custom:horizontal-layout
layout:
width: 60 #宽度
max_cols: 10 #最大值
style: #调整卡片位置#
top: 52.2% #竖向坐标
left: 92% #横向坐标
width: 100% #缩放
opacity: 0.7 #不透明度
cards: #添加需要直接在页面显示内容,替换成你的#
- type: custom:layout-card
layout_type: custom:horizontal-layout
layout:
width: 180
max_cols: 10
cards:
- type: gauge
entity: sensor.miwifi_9c_9d_7e_28_66_a6_wan_upload_speed
name: 上传速度
needle: true
severity:
green: 283000
yellow: 117000
red: 0
max: 400000
- type: gauge
entity: sensor.miwifi_9c_9d_7e_28_66_a6_wan_download_speed
name: 下载速度
severity:
green: 2830000
yellow: 1170000
red: 0
needle: true
max: 4000000
- type: gauge
entity: sensor.miwifi_9c_9d_7e_28_66_a6_devices_2_4g
name: 2.4G设备
unit: 台
max: 60
severity:
green: 0
yellow: 18
red: 42
needle: true
- type: gauge
entity: sensor.miwifi_9c_9d_7e_28_66_a6_devices_5g
name: 5G设备
unit: 台
needle: true
severity:
green: 0
yellow: 9
red: 21
max: 30
- type: gauge
entity: sensor.miwifi_9c_9d_7e_28_66_a6_memory_usage
name: 内存使用
needle: true
severity:
green: 0
yellow: 31
red: 69
备注:注意代码缩放