本帖最后由 www 于 2024-1-24 21:48 编辑
参考网上平板ui界面https://bbs.hassbian.com/thread-18153-1-1.html,不知道是hass版本升级还是mini-graph-card版本升级,突然发现在type: picture-elements下插件mini-graph-card中设置的style失效了。
下面是精简事例代码:
type: picture-elements
image: /local/ui/家庭总览_empty0.png
elements:
- color_thresholds:
- color: '#336699'
value: 4
- color: '#4dd2ff'
value: 8
- color: '#01a4db'
value: 12
- color: '#fccd68'
value: 18
- color: '#fd8524'
value: 22
- color: '#ff1a1a'
value: 28
entities:
- entity: sensor.a4c138b6f1c3_temperature
- entity: sensor.a4c1389b1fb5_temperature
icon: mdi:home-thermometer-outline
update_interval: 600
show:
icon: true
legend: false
name: false
style: |
:host {
left: 10.6%;
top: 90.2%;
width: 22.2%;
overflow: hidden;
height: 15%;
background: none !important;
box-shadow: none !important;
}
.header {
font-size: 10%;
position: absolute !important;
width: 5% !important;
padding: 0 !important;
right: 20% !important;
top: 15% !important;
}
ha-card {
background: none !important;
padding: 0 !important;
border-radius: 0 !important;
transition: none 0s ease 0s !important;
border-color: transparent !important;
}
.icon > ha-icon {
width:10% !important;
height:10% !important;
}
.state__time{
font-size:0.9vw !important;
margin-top: 0.2vw;
font-weight: 300 !important;
opacity: 0.4 !important;
}
.states {
font-size: 80% !important;
padding: 1vw 0vw 0vw 0vw !important;
margin: auto !important;
width: 68%;
color: #FFF;
}
type: custom:mini-graph-card
|