本帖最后由 623305170 于 2024-3-6 15:48 编辑
我自己抠图,通过mushroom卡片做出来的斐讯M1空气检测仪卡片,分享代码,抠好的图片素材在压缩包里面
type: custom:swipe-card
parmameters:
loop: true
effect: coverflow
cards:
- type: custom:stack-in-card
title: M1空气检测仪
mode: vertical
cards:
- type: horizontal-stack
cards:
- type: custom:mod-card
card:
type: picture
image: /local/icons/m1.jpg
card_mod: null
style: |
ha-card {
/* Set padding of card */
padding: 0px 0px 0px 0px;
/* Move card up to match header card */
--ha-card-border-radius: 0px;
margin-left: 0px;
margin-right: 0px;
margin-bottom: 0px;
- type: custom:mushroom-entity-card
entity: sensor.zm1_b0f8931e3014_temperature
name: 温度
layout: vertical
icon: mdi:thermometer
icon_color: green
- type: custom:mushroom-entity-card
entity: sensor.zm1_b0f8931e3014_humidity
name: 湿度
layout: vertical
icon: mdi:water-percent
icon_color: blue
- type: horizontal-stack
cards:
- type: custom:mushroom-entity-card
entity: sensor.zm1_b0f8931e3014_pm25
name: PM2.5
layout: vertical
icon: mdi:blur
icon_color: yellow
- type: custom:mushroom-entity-card
entity: sensor.zm1_b0f8931e3014_hcho
name: 甲醛
layout: vertical
icon: mdi:chemical-weapon
icon_color: purple
- type: custom:stack-in-card
title: M1亮度
mode: vertical
cards:
- type: custom:mushroom-light-card
entity: light.zm1_b0f8931e3014_brightness
use_light_color: false
show_brightness_control: true
show_color_control: false
show_color_temp_control: false
icon_color: light-green
icon: mdi:lightbulb-night-outline
layout: vertical
卡片右滑可以调整M1背景灯亮度
|