我想隐藏mwc-icon-button,删除ha-card作品!
三个点走了,然而它仍然占据空间,有办法去除空间卡将会更加紧凑?见下图,红色标记是三个点的位置。
图像

.content {margin-top: -48 px;}
1像

你也可以尝试使用card-mod改变图标的颜色。

我更改为-24 px这工作好卡,谢谢你的帮助。

第一次我使用这个mod,对我来说这是第一次我使用CSS(对不起,如果这是一个微不足道的问题)。
我有一个picture-entity用来显示一个图像(Octoprint mpeg图像)。
问题是,相机是180度的旋转,因为这个原因我需要旋转图像在家里助理。19463331伟德国际
我能直接应用旋转picture-entity以这种方式:

aspect_ratio: 50% camera_image:相机。octoprint # camera_view:生活形象:http://octopi.local/webcam/?action =快照show_name:假show_state:假类型:picture-entity风格:| ha-card{变换:旋转(180度);}

当我试图打开ha-dialog展示现场图片(我认为这是一个“更多信息”面板)如图所示正确地生活,但与原来的旋转。

我怎么还可以旋转图像所示面板吗?

我还是一个初学者,当我开始学习card-mod对我来说,这并不容易,因为我无法找到一个完整的信息对所有可能的卡片)))。
我有时后小说明不同的卡片。

首先,它将是一个实体卡:

传感器:
изображение

类型:实体实体:传感器。cleargrass_1_co2风格:| ha-card .header . name{颜色:绿色;}ha-card{颜色:红色;info .measurement {} ha-card颜色:橙色;}ha-card .header .icon{颜色:青色;}

binary_sensor:
изображение

类型:实体实体:binary_sensor。service_on_value风格:| ha-card .header . name{颜色:绿色;}ha-card{颜色:红色;}ha-card .header .icon{颜色:青色;}

至于图标——它将总是青色,打开和关闭。
这里有一个例子(device_class:连接):
изображение

下面的代码更改图标的颜色非独立传感器的状态(这里和下面——样式文本被删除),如果传感器,然后是黄色的图标(标准主题的活跃的颜色):

类型:实体实体:binary_sensor。iiyama_2_ping_availability_status风格:| ha-card .header .icon{{%如果is_state (config.entity,“在”)%}颜色:var (——paper-item-icon-active-color);{% %}其他颜色:var (——state-icon-color);{% endif %}}

изображение
изображение

我们也可以改变“活跃”和“不活跃”颜色:

类型:实体实体:binary_sensor。iiyama_2_ping_availability_status风格:| ha-card .header .icon{{%如果is_state (config.entity,“在”)%}颜色:红色;{% %}其他颜色:棕色;{% endif %}}

изображение
изображение

改变字体大小和图标的大小:
изображение

类型:实体实体:传感器。cleargrass_1_co2风格:| ha-card .header . name{颜色:绿色;字体大小:10 px;info value} ha-card{颜色:蓝色;字体大小:8 px;info .measurement {} ha-card颜色:橙色;字体大小:30 px;}ha-card .header .icon{颜色:青色;}ha-card {——mdc-icon-size: 60 px;}

更多的例子伟德国际官方app下载苹果版描述在这里

4喜欢

款式一个滑块实体内部实体卡:

彩色的图标(两个选择):
изображение

类型:实体实体:实体:input_number。battery_level_check名称:Сolor图标风格:|:主持人{——paper-item-icon-color:红色;}-实体:input_number。battery_level_check名称:“Сolor图标(# 2)风格:hui-generic-entity-row:美元:state-badge:美元:ha-icon:美元:| ha-svg-icon{颜色:橙色;}

彩色的文字:(没有“secondary_info”)
изображение

类型:实体实体:实体:input_number。battery_level_check名称:Сolor所有文本风格:|:主持人{颜色:红色;}-实体:input_number。battery_level_check名称:颜色值的名字风格:hui-generic-entity-row:美元:| .info.text-content{颜色:绿色;}-实体:input_number。风格:battery_level_check名称:颜色值| hui-generic-entity-row .flex .state{颜色:红色;}

词用文本(没有“secondary_info”)
изображение

类型:实体实体:实体:input_number。battery_level_check名称:裹包包装包裹包装风格:hui-generic-entity-row:美元:| .info.text-content{颜色:红色;文本溢出:复原!重要;空白:复原!重要;}-实体:input_number。battery_level_check名称:不包不包不包不包

上面描述的所有样式:(没有“secondary_info”)
изображение

类型:实体实体:实体:input_number。battery_level_check名称:裹包包装包裹包装风格:hui-generic-entity-row:美元:state-badge:美元:ha-icon:美元:| ha-svg-icon{颜色:橙色;}:| .info.text-content{颜色:红色;文本溢出:复原!重要;空白:复原!重要;}:| .flex .state{颜色:红色;}

常见的风格为所有滑块:(没有“secondary_info”)
изображение

类型:实体名称:常见的风格:hui-input-number-entity-row:美元:hui-generic-entity-row:美元:state-badge:美元:ha-icon:美元:| ha-svg-icon{颜色:橙色;}:| .info.text-content{颜色:红色;文本溢出:复原!重要;空白:复原!重要;}:| .flex .state{颜色:红色;实体}:实体:input_number。battery_level_check名称:滑块滑块滑块滑块滑块——太阳。太阳-实体:input_number。battery_level_check名称:不能ovewrite风格不能ovewrite风格不能ovewrite风格风格:|:主持人{颜色:绿色!重要;}

请注意,样式第二滑块不能单独覆盖。


如果指定“secondary_info”然后一个代码更改——我必须使用“信息”而不是“.info.text-content”:
изображение

类型:实体实体:实体:input_number。battery_level_check名称:颜色值的名字secondary_info:上次调整风格:hui-generic-entity-row:美元:| info{颜色:绿色;}

但是根据我的测试在所有上述情况下可以一直使用“信息”——这似乎工作。

彩色secondary-info:
изображение

类型:实体实体:实体:input_number。battery_level_check名称:Сolor二级secondary_info:上次调整风格:hui-generic-entity-row:美元:| info .secondary ha-relative-time{颜色:橙色;}

不同的颜色名称& secondary_info:
изображение

类型:实体实体:实体:input_number。battery_level_check名称:不同颜色secondary_info:上次调整风格:hui-generic-entity-row:美元:info: | .secondary ha-relative-time{颜色:橙色;info{}: |色:绿色;}

彩色的滑块:
изображение

类型:实体实体:实体:input_number。battery_level_check名称:Сolored滑块风格:hui-generic-entity-row: | .flex ha-slider {——paper-slider-active-color:橙色;——paper-slider-knob-color:绿色;——paper-slider-container-color:青色;}

隐藏元素:
隐藏的图标:
图像

类型:实体实体:实体:input_number。battery_level_check名称:隐藏图标风格:hui-generic-entity-row: $: | state-badge{显示:没有;}

隐藏的状态:
图像

类型:实体实体:实体:input_number。battery_level_check名称:隐藏状态风格:| hui-generic-entity-row .flex .state{显示:没有;}

隐藏的名字:
图像

类型:实体实体:实体:input_number。battery_level_check名称:隐藏名字风格:hui-generic-entity-row: $: | info{显示:没有;}:| ha-slider {max-width:复原!重要;}

最小的观点:
图像

类型:实体实体:实体:input_number。info {battery_level_check风格:hui-generic-entity-row: $: |显示:没有;}state-badge{显示:没有;}:| ha-slider {max-width:复原!重要;}.flex .state{显示:没有;}

更多的例子伟德国际官方app下载苹果版描述在这里

1像

样式实体卡
(包括一些特殊的行元素-按钮,部分,分频器)

彩色背景和圆角——可以很容易地通过使用”——ha-card-background”&”——ha-card-border-radius”变量:
图像

类型:实体标题:标题实体:-实体:太阳。阳光风格:| ha-card {——ha-card-background:橙色;——ha-card-border-radius: 14 px;}

使用背景图片:
测试图片:


默认背景图像放置w / o调整:
图像

类型:实体实体:实体:太阳。太阳标题:图像剪风格:| ha-card{背景图片:url(“/地方/图片/ blue_low_2.jpg”);}

如何适应图像定义卡的大小:
图像
注意:名片的高度定义。

类型:实体实体:实体:太阳。太阳标题:图像拟合风格:| ha-card{背景图片:url(“/地方/图片/ blue_low_2.jpg”);background-size: 100% - 100%;身高:250 px !重要;}

一个内容区域:
图像

类型:实体实体:实体:太阳。太阳标题:图片上内容风格:| ha-card .card-content{背景图片:url(“/地方/图片/ blue_low_2.jpg”);background-size: 100% - 100%;}

仅供一个头部区域:
图像

类型:实体实体:实体:太阳。太阳-实体:sun.suntitle: Image fitted to header style: | ha-card .card-header { background-image: url("/local/images/blue_low_2.jpg"); background-size: 100% 100%; }

定义了一个位置:
图像

类型:实体实体:实体:太阳。太阳-实体:sun.suntitle: Image placed on header style: | ha-card .card-header { background-image: url("/local/images/blue_low_2.jpg"); background-size: 30% 50%; background-position: 95% center; background-repeat: no-repeat; }

彩色的文字:(w / o“secondary_info”)
изображение

类型:实体实体:实体:太阳。阳光的名字:彩色text style: | :host { color: red; } - entity: sun.sun name: Colored value style: | :host .text-content { color: orange; } - entity: sun.sun name: Colored name style: hui-generic-entity-row: $: | .info.pointer.text-content { color: green; } - entity: sun.sun name: Colored name & value style: hui-generic-entity-row: $: | .info.pointer.text-content { color: green; } .: | .text-content { color: orange; }

彩色的文字:(与“secondary_info”)
如果“secondary_info”指定的代码变更,我需要使用吗“.info.pointer”而不是“.info.pointer.text-content”
根据我的测试在所有上述情况下可以一直使用“.info.pointer”——这似乎工作。
изображение

类型:实体实体:实体:太阳。阳光的名字:彩色name style: hui-generic-entity-row: $: | .info.pointer { color: orange; } - entity: sun.sun name: Colored name (with secondary_info) secondary_info: last-changed style: hui-generic-entity-row: $: | .info.pointer { color: cyan; }

常见的风格:为所有行改变颜色:(除了“secondary_info”)
所有文本(除了一个标题):
изображение

类型:实体名称:一些标题风格:| ha-card .card-content{颜色:红色;实体}:实体:input_boolean。test_boolean -实体:太阳。太阳secondary_info:最后一次修改

只值:
изображение

类型:实体风格:hui-text-entity-row: $: hui-generic-entity-row: | .text-content{颜色:红色;实体}:实体:sun.sun- entity: sun.sun

只有名字:
изображение

类型:实体风格:hui-text-entity-row: $: hui-generic-entity-row:美元:| .info.pointer.text-content{颜色:绿色;实体}:实体:sun.sun- entity: sun.sun

值和名称:
изображение

类型:实体风格:hui-text-entity-row: $: hui-generic-entity-row:美元:| .info.pointer.text-content{颜色:绿色;}:| .text-content{颜色:红色;实体}:实体:sun.sun- entity: sun.sun

改变颜色为整个卡(即包括一个标题):(除了“secondary_info”)
изображение

标题:类型:实体的共同之处:所有文本风格:| ha-card{颜色:橙色;实体}:实体:sun.sunsecondary_info: last-changed - entity: sun.sun

颜色的标题:
изображение

类型:实体名称:风格:彩色标题的风格:| ha-card .card-header{颜色:红色;实体}:实体:sun.sun

另一个选项——使用”——ha-card-header-color”变量:

类型:实体名称:风格:彩色标题的风格:| ha-card {——ha-card-header-color:红色;实体}:实体:sun.sun

覆盖类型:
изображение
指定:

  • 所有文本是蓝色的
  • 的所有行文本是红色的
  • 一行的文本是青色
类型:实体名称:“改变颜色”风格:| ha-card{颜色:蓝色;}ha-card .card-content{颜色:红色;实体}:实体:input_boolean。test_boolean名称:继承的颜色-实体:太阳。阳光的名字:继承颜色secondary_info:最后一次修改-实体:太阳。阳光的名字:改变颜色secondary_info:上次调整风格:|:主机{颜色:青色;}

彩色secondary_info:
изображение

类型:实体实体:实体:太阳。太阳secondary_info:最后一次修改style: hui-generic-entity-row: $: .info.pointer .secondary: | ha-relative-time { color: green !important; }

注意,我使用“重要!”没有它,它不工作,不知道为什么…

彩色的secondaryinfo-entity-row:
有时需要使用“自定义:secondaryinfo-entity-row”,这是如何的风格(注意“hui-toggle-entity-row”添加为例):
изображение

类型:实体实体:类型:“自定义:secondaryinfo-entity-row”实体:input_boolean。test_boolean名称:secondaryinfo-entity-row secondary_info:一些彩色文本风格:hui-toggle-entity-row:美元:hui-generic-entity-row:美元:| .info.pointer .secondary{颜色:红色;}

它看起来类似的标准“secondary_info”(没有“ha-relative-time”指定)。

常见的样式:改变颜色“secondary_info”:
изображение

类型:实体名称:常见的样式风格:hui-text-entity-row:美元:hui-generic-entity-row:美元:.info.pointer .secondary: | ha-relative-time{颜色:绿色!重要;实体}:实体:sun.sunsecondary_info: last-changed - entity: sun.sun secondary_info: last-changed

如何设置不同颜色的名字&secondary-info:
изображение

类型:实体实体:实体:太阳。太阳secondary_info:最后一次修改style: hui-generic-entity-row: $: .info.pointer: | .secondary ha-relative-time { color: green; } .: | .info.pointer { color: red; }

额外的样式“secondary-info”:
帖子


彩色的运行按钮行:
图像

标题:类型:实体运行按钮实体:类型:按钮名称:彩色文本风格:| .flex{颜色:红色;}-类型:按钮名称:彩色图标和文本样式:ha-icon:美元:| ha-svg-icon{颜色:绿色;}:| .flex{颜色:红色;}-类型:按钮名称:彩色按钮风格:.flex mwc-button:美元:| .mdc-button{颜色:橙色!重要;}-类型:按钮名称:彩色文本和按钮风格:.flex mwc-button:美元:| .mdc-button{颜色:橙色!重要;}:| .flex{颜色:红色;}-类型:按钮名称:彩色图标、文本和按钮的风格:ha-icon:美元:| ha-svg-icon{颜色:绿色;}.flex mwc-button: $: | .mdc-button{颜色:橙色!重要;}:| .flex{颜色:红色;}-类型:按钮名称:样式按钮风格:.flex mwc-button:美元:| .mdc-button{背景:橙色!重要; margin-right: 10px; border: 1px solid black !important; border-radius: 10px !important; }

彩色的部分:(包括彩色标签,彩色部分的上,看不见的部分的上部线)

类型:实体名称:彩色部分实体:类型:部分标签:彩色部分风格:| .label{颜色:紫红色!重要;}-实体:sun.sun- entity: sun.sun - type: section label: Colored section style: | .label { color: green !important; } - entity: sun.sun - entity: sun.sun - type: section label: Colored section's line style: | .divider { background-color: red !important; margin-top: 32px !important; height: 8px !important; } - entity: sun.sun - entity: sun.sun - type: section label: Invisible section's line style: | .divider { background-color: transparent !important; margin-top: 32px !important; } - entity: sun.sun - entity: sun.sun

样式的上部分线包括:

  • “margin-top”——空间线前;
  • “高度”——一条线的厚度;
  • “背景颜色”——一条线的颜色。

注意:“重要!”都是确定的。


样式分隔行:
应该使用样式本机“样式”选项为“实体卡”

颜色分:
изображение

类型:实体名称:彩色分配器(not-card-mod)实体:-实体:太阳。太阳-实体:sun.sun- type: divider style: background-color: red height: 8px - entity: sun.sun - entity: sun.sun - type: divider style: background-color: magenta - entity: sun.sun - entity: sun.sun

看不见的分频器(可以用作间距行):
изображение

类型:实体名称:看不见的分配器(not-card-mod)实体:-实体:太阳。太阳-实体:sun.sun- type: divider style: background-color: transparent height: 32px - entity: sun.sun - entity: sun.sun

改变图标的颜色:
在默认情况下等实体“传感器”(相同“device_tracker”,“人”,“区域”…)一个图标的颜色并不依赖于实体的状态。
有两种方法来改变一个颜色:

  • 使用一个”——paper-item-icon-color”变量;
  • 使用一个“颜色”CSS属性。

对于一些行(方法# 1,# 2):
图像

类型:实体实体:实体:传感器。cleargrass_1_co2名称:彩色风格:|:主持人{——paper-item-icon-color:红色;}-实体:传感器。cleargrass_1_co2名称:默认颜色
类型:实体实体:实体:传感器。cleargrass_1_co2名称:彩色风格:hui-generic-entity-row: $: state-badge:美元:ha-icon:美元:| ha-svg-icon{颜色:红色;}-实体:传感器。cleargrass_1_co2名称:默认颜色

所有行:
方法# 1(使用”——paper-item-icon-color”变量):
图像
注意:对于第三行颜色覆盖了一个个人风格。

类型:实体风格:| ha-card {——paper-item-icon-color:红色;实体}:实体:传感器。cleargrass_1_co2名称:彩色-实体:传感器。cleargrass_1_co2名称:彩色-实体:传感器。cleargrass_1_co2名称:覆盖颜色(主机)的风格:|:主持人{——paper-item-icon-color:青色;}-实体:sun.sunname: Colored

方法# 2(使用“颜色”CSS属性):
图像

类型:实体风格:hui-sensor-entity-row: $: hui-generic-entity-row:美元:state-badge:美元:ha-icon:美元:| ha-svg-icon{颜色:红色;}hui-text-entity-row: $: hui-generic-entity-row: $: state-badge:美元:ha-icon:美元:| ha-svg-icon{颜色:青色;实体}:实体:sun.sunname: Colored - entity: sun.sun name: Colored - entity: sensor.cleargrass_1_co2 name: Colored - entity: sensor.cleargrass_1_co2 name: Colored - entity: input_boolean.test_boolean name: Default color - entity: sensor.cleargrass_1_co2 name: 'Overwritten color (:host) - failed' style: | :host { --paper-item-icon-color: orange !important; } - entity: sensor.cleargrass_1_co2 name: Overwritten color style: hui-generic-entity-row: $: state-badge: $: ha-icon: $: | ha-svg-icon { color: green !important; }

注:
1。第六届图标没有覆盖:常见的样式是由方法# 2,个人风格——方法# 1,所以覆盖失败了。
2。第七届图标覆盖:常见的样式是由方法# 2,个人风格——方法# 2(与“重要!”)。
3所示。以来的第五个图标不是彩色“hui-sensor-entity-row”“hui-text-entity-row”不影响的“input_boolean”行- - - - - -“hui-toggle-entity-row”必须使用。


在默认情况下等实体“binary_sensor”,“sun.sun”,“开关”,“input_boolean”——一个图标的颜色取决于实体的状态——如果该财产“state_color:真正的“将卡片(或为这个特定的行)。如果它被设置“假”,那么颜色并不依赖于状态——使用相同的方法# 1,# 2至于“传感器”(上述)。
有两种方法来改变一个颜色:

  • 使用”——paper-item-icon-color””——paper-item-icon-active-color”变量;
  • 使用一个“颜色”CSS属性。

方法# 1(使用”——paper-item-icon-color””——paper-item-icon-active-color”变量):
对于一些行:
图像

类型:实体state_color:真正的实体:-实体:binary_sensor。battery_charging_cleargrass_1名称:彩色风格:|:主持人{——paper-item-icon-active-color:红色;——paper-item-icon-color:青色;}-实体:sun.sunname: Default colors - entity: binary_sensor.service_off_value name: Default colors - entity: binary_sensor.service_off_value name: Colored style: | :host { --paper-item-icon-active-color: red; --paper-item-icon-color: cyan; }

所有行:
图像
注:第四行颜色覆盖。

类型:实体state_color:真正的风格:| ha-card {——paper-item-icon-active-color:红色;——paper-item-icon-color:青色;实体}:实体:binary_sensor。battery_charging_cleargrass_1名称:彩色-实体:太阳。阳光的名字:颜色-实体:binary_sensor。service_off_value名称:彩色-实体:binary_sensor。service_off_value名称:覆盖的颜色风格:|:主持人{——paper-item-icon-active-color:绿色;——paper-item-icon-color:红色;}

方法# 2(使用“颜色”CSS属性):
对于一些行:
图像

类型:实体state_color:真正的实体:-实体:binary_sensor。battery_charging_cleargrass_1名称:默认颜色-实体:太阳。阳光的名字:默认颜色-实体:binary_sensor。service_off_value名称:默认颜色-实体:binary_sensor。service_off_value名称:彩色风格:hui-generic-entity-row: $: state-badge:美元:ha-icon:美元:| ha-svg-icon{颜色:红色;}

所有行:
图像
注:第四行颜色覆盖。

类型:实体state_color:真正的风格:hui-text-entity-row:美元:hui-generic-entity-row:美元:state-badge:美元:ha-icon:美元:| ha-svg-icon{颜色:青色;实体}:实体:binary_sensor。battery_charging_cleargrass_1名称:彩色-实体:太阳。阳光的名字:颜色-实体:binary_sensor。service_off_value名称:彩色-实体:binary_sensor。service_off_value名称:覆盖的颜色风格:hui-generic-entity-row: $: state-badge:美元:ha-icon:美元:| ha-svg-icon{颜色:红色!重要;}

样式entity_picture:
在默认情况下(至少在默认主题)“entity_picture”显示在一个圆框:
图像

类型:实体实体:实体:person.ildar

它——的原因“这个特性:50%”财产。
这是如何与圆角方形框架:
图像

类型:实体实体:实体:person.ildarstyle: hui-text-entity-row$hui-generic-entity-row$: | state-badge { border-radius: 10%; }

我们也可以应用过滤器“entity_picture”:
图像

类型:实体实体:实体:person.ildar- entity: person.ildar style: hui-generic-entity-row$: | state-badge { filter: grayscale(80%); }

包装的文字:
изображение

类型:实体实体:实体:太阳。太阳的名字:裹包包装包裹裹包包装风格:hui-generic-entity-row:美元:| info{颜色:红色;文本溢出:复原!重要;空白:复原!重要;}-实体:sun.sunname: Not wrapped Not wrapped Not wrapped Not wrapped

改变字体大小:
在这里看到的


改变图标的大小:
整张卡片:
изображение

类型:实体show_header_toggle:假实体:-实体:太阳。太阳-实体:sun.sun风格:|ha-card {--mdc-icon-size: 60px; }

对于一些行:
изображение

类型:实体show_header_toggle:假实体:-实体:太阳。太阳-实体:sun.sun风格:|:host { --mdc-icon-size: 60px; }

样式卡的标题如果指定一个主要图标:
主要的图标,图标卡片的标题。

类型:垂直堆栈标题:卡图标卡片:-类型:实体名称:彩色图标和标题图标:mdi:汽车的风格:| .card-header . name{颜色:红色;实体}:实体:sun.sun- entity: sun.sun - type: entities title: Colored icon icon: 'mdi:car' style: .card-header .name .icon: $: | ha-svg-icon { color: orange; } entities: - entity: sun.sun - entity: sun.sun - type: entities title: Colored icon & title (different) icon: 'mdi:car' style: .card-header: .name .icon: $: | ha-svg-icon { color: orange; } .: | .name { color: red; } entities: - entity: sun.sun - entity: sun.sun - type: entities title: Colored title icon: 'mdi:car' style: .card-header: .name .icon: $: | ha-svg-icon { color: var(--paper-item-icon-color); } .: | .name { color: red; } entities: - entity: sun.sun - entity: sun.sun

调整图标:
изображение

类型:实体名称:缩放图标图标:mdi:汽车的风格:.card-header: | . name .icon {——mdc-icon-size: 60 px;实体}:实体:sun.sun- entity: sun.sun

添加一个前缀或后缀,数学操作,更换一个值:
帖子



更多的例子伟德国际官方app下载苹果版描述在这里

4喜欢

@Ildar_Gabdullin哇!您可能想要考虑公关在GitHub添加这个文档。www.19463331.com

1像

样式“自定义:multiple-entity-row”

彩色文本在一行:
изображение

类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:|:主持人{颜色:红色;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。test_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。test_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc样式:“——paper-item-icon-color”:青色名称:彩色行单元:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

注意:最后一个青色的图标是彩色的使用“multiple-entity-row:风格”属性(而不是“card-mod”)。

在一排彩色标题:
изображение

类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:hui-generic-entity-row: $: | .info.pointer{颜色:橙色;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。test_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。test_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc样式:“——paper-item-icon-color”:青色名称:彩色标题单元:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

彩色的头在一行(一种颜色):
изображение

类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:|:主机.entity跨度{颜色:红色;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。test_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。test_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc样式:“——paper-item-icon-color”:青色名称:彩色头单元:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

彩色头连续(不同的颜色):
изображение

类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:|:主机.entities-row div.entity: nth-child(1)跨{颜色:红色;}:主机.entities-row div.entity: nth-child(3)跨越{颜色:绿色;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。service_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。service_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc样式:“——paper-item-icon-color”:青色名称:彩色头单元:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

彩色的连续值(一种颜色):
изображение

类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:|:主机.entity{颜色:红色;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。test_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。test_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc样式:“——paper-item-icon-color”:青色名称:彩色值单元:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

彩色的连续值(不同的颜色):
изображение

类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:|:主机.entities-row div.entity: nth-child(1){颜色:橙色;}:主机.entities-row div.entity: nth-child(3){颜色:红色;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。service_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。service_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc样式:“——paper-item-icon-color”:青色名称:彩色值单元:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

改变一个颜色“secondary_info”对于一些行:
изображение

类型:实体实体:类型:“自定义:multiple-entity-row”风格:hui-generic-entity-row:美元:.info.pointer .secondary: | ha-relative-time{颜色:红色!重要;}实体:传感器。yandex_time_home_ildar实体:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。test_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。test_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc样式:“——paper-item-icon-color”:青色名称:彩色secondary_info单元:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

改变的颜色“secondary_info”所有行:
изображение

类型:实体风格:multiple-entity-row: $: hui-generic-entity-row:美元:.info.pointer .secondary: | ha-relative-time{颜色:绿色!重要;实体}:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar实体:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。test_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。test_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc样式:“——paper-item-icon-color”:青色名称:彩色secondary_info单元:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改-类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar实体:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。test_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。test_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc样式:“——paper-item-icon-color”:青色名称:彩色secondary_info单元:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

不同颜色的标题&“secondary_info”:
изображение

类型:实体实体:类型:“自定义:multiple-entity-row”风格:hui-generic-entity-row:美元:.info.pointer: .secondary: | ha-relative-time{颜色:红色!重要;}:| .info.pointer{颜色:橙色;}实体:传感器。yandex_time_home_ildar实体:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。test_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。test_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc样式:“——paper-item-icon-color”:青色名称:彩色secondary_info单元:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

连续彩色图标(一种颜色为所有图标):
изображение
注意,最后一个图标的颜色由“multiple-entity-row:风格”财产。

类型:实体实体:类型:“自定义:multiple-entity-row”风格:|:主持人{——paper-item-icon-color:红色;}实体:传感器。yandex_time_home_ildar实体:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。test_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。test_empty_value名称:假单位:假图标:mdi:链接的样式:“——paper-item-icon-color”:青色tap_action:行动:url url_path: xxxcc名称:彩色图标(除了一个)单位:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

彩色图标1:
изображение

类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:hui-generic-entity-row: $: state-badge: $: ha-icon:美元:| ha-svg-icon{颜色:橙色;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。test_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。test_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc名称:彩色图标单位1:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

彩色的二级图标:
изображение

类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:hui-generic-entity-row: state-badge: $: ha-icon:美元:| ha-svg-icon{颜色:绿色;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。test_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。test_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc名称:彩色单元:二级图标”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

彩色图标(不同的颜色):
изображение

类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:hui-generic-entity-row:“div.entity: nth-child (2) state-badge”:美元:ha-icon:美元:| ha-svg-icon{颜色:绿色;}“div.entity: nth-child (4) state-badge”:美元:ha-icon:美元:| ha-svg-icon{颜色:红色;}:美元state-badge: $: ha-icon: $: | ha-svg-icon{颜色:橙色;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。service_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。service_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc名称:彩色图标单位:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:hui-generic-entity-row: $: state-badge: $: ha-icon:美元:| ha-svg-icon{颜色:橙色;}“div.entity: nth-child (2) state-badge”:美元:ha-icon:美元:| ha-svg-icon{颜色:绿色;}“div.entity: nth-child (4) state-badge”:美元:ha-icon:美元:| ha-svg-icon{颜色:红色;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。service_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。service_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc名称:“变体# 2”单元:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

包装的文字:
изображение

类型:实体实体:类型:“自定义:multiple-entity-row”风格:hui-generic-entity-row:美元:| .info.pointer{颜色:红色;文本溢出:复原!重要;空白:复原!重要;}实体:传感器。yandex_time_home_ildar实体:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。test_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。test_empty_value名称:假单位:假图标:“mdi:链接”tap_action:行动:url url_path: xxxcc样式:“——paper-item-icon-color”:青色的名字:裹包包装包裹包装单位:”图标:mdi:账户的切换:假show_state:假state_header:“secondary_info:最后一次修改

旋转图标:
изображение

类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:hui-generic-entity-row:“div.entity: nth-child (2) state-badge”:美元:ha-icon:美元:| ha-svg-icon{颜色:绿色;变换:旋转(180度);}“div.entity: nth-child (4) state-badge”:美元:ha-icon:美元:| ha-svg-icon{颜色:红色;变换:旋转(45度);}:美元state-badge: $: ha-icon: $: | ha-svg-icon{颜色:橙色;变换:旋转(-45度);实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки单位:“——实体:传感器。service_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу单位:“风格:宽度:60 px text-align:中心-实体:传感器。service_empty_value name: false unit: false icon: 'mdi:car' tap_action: action: url url_path: xxxcc name: Rotated icons unit: '' icon: 'mdi:car' toggle: false show_state: false state_header: '' secondary_info: last-changed

改变字体大小:

类型:垂直堆栈标题:字体大小卡:类型:实体实体:-类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:|:主持人{字体大小:8 px;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки-实体:传感器。service_empty_value名称:错误图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу-实体:传感器。service_empty_value名称:错误图标:mdi:链接的名字:整行(标题除外)图标:“mdi:账户”show_state:假state_header:“secondary_info:最后一次修改-类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:hui-generic-entity-row: $: | .info.pointer{字体大小:8 px;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки-实体:传感器。service_empty_value名称:错误图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу-实体:传感器。service_empty_value名称:错误图标:mdi:链接的名字:标题(包括secondary_info)图标:“mdi:账户”show_state:假state_header:“secondary_info:最后一次修改-类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:|:主机.entity跨度{字体大小:18 px}实体:-实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки-实体:传感器。service_empty_value名称:错误图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу-实体:传感器。service_empty_value名称:错误图标:mdi:链接的名字:标题图标:“mdi:账户”show_state:假state_header:“secondary_info:最后一次修改-类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:|:主机.entities-row div.entity: nth-child(1)跨{字体大小:7 px;}:主机.entities-row div.entity: nth-child(3)跨越{字体大小:17 px;实体}:实体:传感器。yandex_time_home_ildar attribute: jamsrate name: пробки - entity: sensor.service_empty_value name: false icon: 'mdi:car' - entity: sensor.yandex_time_home_ildar name: на дорогу - entity: sensor.service_empty_value name: false icon: 'mdi:link' name: Headers (different) icon: 'mdi:account' show_state: false state_header: '' secondary_info: last-changed - type: entities entities: - type: 'custom:multiple-entity-row' entity: sensor.yandex_time_home_ildar style: | :host .entity { font-size: 7px; } entities: - entity: sensor.yandex_time_home_ildar attribute: jamsrate name: пробки - entity: sensor.service_empty_value name: false icon: 'mdi:car' - entity: sensor.yandex_time_home_ildar name: на дорогу - entity: sensor.service_empty_value name: false icon: 'mdi:link' name: Values icon: 'mdi:account' show_state: false state_header: '' secondary_info: last-changed - type: entities entities: - type: 'custom:multiple-entity-row' entity: sensor.yandex_time_home_ildar style: | :host .entities-row div.entity:nth-child(1) { font-size: 7px; } :host .entities-row div.entity:nth-child(3) { font-size: 17px; } entities: - entity: sensor.yandex_time_home_ildar attribute: jamsrate name: пробки - entity: sensor.service_empty_value name: false icon: 'mdi:car' - entity: sensor.yandex_time_home_ildar name: на дорогу - entity: sensor.service_empty_value name: false icon: 'mdi:link' name: Values (different) icon: 'mdi:account' show_state: false state_header: '' secondary_info: last-changed - type: entities entities: - type: 'custom:multiple-entity-row' style: hui-generic-entity-row: $: .info.pointer .secondary: | ha-relative-time { font-size: 20px; } entity: sensor.yandex_time_home_ildar entities: - entity: sensor.yandex_time_home_ildar attribute: jamsrate name: пробки - entity: sensor.service_empty_value name: false icon: 'mdi:car' - entity: sensor.yandex_time_home_ildar name: на дорогу - entity: sensor.service_empty_value name: false icon: 'mdi:link' name: Secondary_info icon: 'mdi:account' show_state: false state_header: '' secondary_info: last-changed

调整图标:
изображение

卡片类型:垂直堆栈标题:调整图标:类型:实体实体:-类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:|:主持人{——mdc-icon-size: 40像素;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки-实体:传感器。service_empty_value名称:错误图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу-实体:传感器。service_empty_value名称:错误图标:mdi:链接的名字:所有图标图标:“mdi:账户”show_state:假state_header:“secondary_info:最后一次修改-类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:hui-generic-entity-row: $: | state-badge {——mdc-icon-size: 40像素;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки-实体:传感器。service_empty_value名称:错误图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу-实体:传感器。service_empty_value名称:错误图标:mdi:链接的名字:主要图标图标:“mdi:账户”show_state:假state_header:“secondary_info:最后一次修改-类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:hui-generic-entity-row: | state-badge {——mdc-icon-size: 40 px !重要;实体}:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки-实体:传感器。service_empty_value名称:错误图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу-实体:传感器。service_empty_value名称:错误图标:mdi:链接的名字:Seconary图标图标:“mdi:账户”show_state:假state_header:“secondary_info:最后一次修改-类型:实体实体:类型:“自定义:multiple-entity-row”实体:传感器。yandex_time_home_ildar风格:hui-generic-entity-row: | div.entity: nth-child (2) state-badge {——mdc-icon-size: 40像素; } div.entity:nth-child(4) state-badge { --mdc-icon-size: 10px; } entities: - entity: sensor.yandex_time_home_ildar attribute: jamsrate name: пробки - entity: sensor.service_empty_value name: false icon: 'mdi:car' - entity: sensor.yandex_time_home_ildar name: на дорогу - entity: sensor.service_empty_value name: false icon: 'mdi:link' name: Seconary icons (different) icon: 'mdi:account' show_state: false state_header: '' secondary_info: last-changed

隐藏主要图标:
图像

类型:实体实体:类型:“自定义:multiple-entity-row”风格:hui-generic-entity-row:美元:| state-badge{显示:没有;}实体:传感器。yandex_time_home_ildar实体:实体:传感器。yandex_time_home_ildar属性:jamsrate名称:пробки-实体:传感器。service_empty_value名称:假单位:假图标:“mdi:汽车”——实体:传感器。yandex_time_home_ildar名称:надорогу-实体:传感器。service_empty_value名称:假单位:假图标:mdi:链接的名字:隐藏主要图标图标:“mdi:账户”show_state:假的

更换一个值,数学操作:
帖子


更多的例子伟德国际官方app下载苹果版描述在这里

6喜欢

+ 1。广泛的例子,这就是我伟德国际官方app下载苹果版们需要的很多更复杂的自定义和卡片。

样式“自定义:fold-entity-row”:

彩色文本(名称和值):

如何指定一个颜色连续“头”和一些“物品”行:
изображение

类型:实体实体:类型:“自定义:fold-entity-row”头:实体:太阳。阳光的名字:个别颜色风格:|:主机{颜色:红色;}填充:15开放:真正的实体:-实体:太阳。阳光的名字:个别颜色风格:|:主机{颜色:绿色;}-实体:sun.sun- entity: sun.sun

如何为所有行+指定一个颜色不同的颜色对于一些“物品”行(注意,雪佛龙按钮也是彩色的):
изображение

类型:实体实体:类型:“自定义:fold-entity-row”风格:|:主持人{颜色:红色;}:实体:太阳。阳光的名字:常见的颜色填充:15开放:真正的实体:-实体:太阳。阳光的名字:个别颜色风格:|:主机{颜色:绿色;}-实体:sun.sunname: common color - entity: sun.sun name: common color

彩色的价值观:
如何指定一个颜色连续“头”和一些“物品”行:
изображение

类型:实体实体:类型:“自定义:fold-entity-row”头:实体:太阳。阳光的名字:个别颜色风格:hui-generic-entity-row: | .text-content。指针{颜色:红色;}填充:15开放:真正的实体:-实体:太阳。阳光的名字:个别颜色风格:hui-generic-entity-row: | .text-content。指针{颜色:绿色;}-实体:sun.sun

如何指定一种颜色为所有“物品”行:
有两个选择——通过使用“#项目”与使用“nth-child”
изображение

类型:实体实体:类型:“自定义:fold-entity-row”风格:“#项目”:hui-text-entity-row:美元:hui-generic-entity-row: | .text-content。指针{颜色:红色;}:实体:太阳。太阳填充:15开放:真正的实体:-实体:太阳。阳光的名字:常见的颜色——实体:太阳。阳光的名字:常见的颜色- type: 'custom:fold-entity-row' style: 'div:nth-child(2)': hui-text-entity-row: $: hui-generic-entity-row: | .text-content.pointer { color: red; } head: entity: sun.sun padding: 15 open: true entities: - entity: sun.sun name: common color - entity: sun.sun name: common color

如何为所有“物品”行+指定一个颜色不同的颜色对于一些“物品”行:
изображение

类型:实体实体:类型:“自定义:fold-entity-row”风格:“#项目”:hui-text-entity-row:美元:hui-generic-entity-row: | .text-content。指针{颜色:红色;}:实体:太阳。太阳填充:15开放:真正的实体:-实体:太阳。阳光的名字:个别颜色风格:hui-generic-entity-row: | .text-content。指针{颜色:绿色!重要;}-实体:sun.sunname: common color - entity: sun.sun name: common color

如何为所有行指定一个颜色:
изображение

类型:实体实体:类型:“自定义:fold-entity-row”风格:hui-text-entity-row:美元:hui-generic-entity-row: | .text-content。指针{颜色:红色;}“#项目”:hui-text-entity-row: $: hui-generic-entity-row: | .text-content。指针{颜色:红色;}:实体:太阳。阳光的名字:常见的颜色填充:15开放:真正的实体:-实体:太阳。阳光的名字:常见的颜色——实体:太阳。阳光的名字:常见的颜色

彩色的名字:
注意:所有代码为“没有“secondary_info””。
如果“secondary_info”然后指定替换”.info.pointer.text-content”与“.info.pointer”。
根据我的测试,你可以只使用“.info.pointer”,它无论如何都要工作。

如何指定一种颜色的“头”和一些“物品”行:
изображение

类型:实体实体:类型:“自定义:fold-entity-row”头:实体:太阳。阳光的名字:个别颜色风格:hui-generic-entity-row: $: | .info.pointer.text-content{颜色:红色;}填充:15开放:真正的实体:-实体:太阳。阳光的名字:个别颜色风格:hui-generic-entity-row: $: | .info.pointer.text-content{颜色:绿色;}-实体:sun.sun

如何为所有“物品”行指定一个颜色:
有两个选择——通过使用“#项目”与使用“nth-child”
изображение

类型:实体实体:类型:“自定义:fold-entity-row”风格:“#项目”:hui-text-entity-row:美元:hui-generic-entity-row:美元:| .info.pointer.text-content{颜色:红色;}:实体:太阳。太阳填充:15开放:真正的实体:-实体:太阳。阳光的名字:常见的颜色——实体:太阳。阳光的名字:常见的颜色- type: 'custom:fold-entity-row' style: 'div:nth-child(2)': hui-text-entity-row: $: hui-generic-entity-row: $: | .info.pointer.text-content { color: red; } head: entity: sun.sun padding: 15 open: true entities: - entity: sun.sun name: common color - entity: sun.sun name: common color

如何为所有“物品”行+指定一个颜色不同的颜色对于一些“物品”行:
изображение

类型:实体实体:类型:“自定义:fold-entity-row”风格:“#项目”:hui-text-entity-row:美元:hui-generic-entity-row:美元:| .info.pointer.text-content{颜色:红色;}:实体:太阳。太阳填充:15开放:真正的实体:-实体:太阳。阳光的名字:个别颜色风格:hui-generic-entity-row: $: | .info.pointer.text-content{颜色:绿色!重要;}-实体:sun.sunname: common color - entity: sun.sun name: common color

如何为所有行指定一个颜色:
изображение

类型:实体实体:类型:“自定义:fold-entity-row”风格:hui-text-entity-row:美元:hui-generic-entity-row:美元:| .info.pointer.text-content{颜色:红色;}“#项目”:hui-text-entity-row: $: hui-generic-entity-row:美元:| .info.pointer.text-content{颜色:红色;}:实体:太阳。阳光的名字:常见的颜色填充:15开放:真正的实体:-实体:太阳。阳光的名字:常见的颜色——实体:太阳。阳光的名字:常见的颜色

彩色secondary_info:
如何指定一个颜色连续“头”和一些“物品”行:
изображение

类型:实体实体:类型:“自定义:fold-entity-row”头:实体:太阳。太阳的名字:个别颜色secondary_info:上次调整风格:hui-generic-entity-row:美元:| .info.pointer .secondary ha-relative-time{颜色:红色;}填充:15开放:真正的实体:-实体:太阳。太阳的名字:个别颜色secondary_info:上次调整风格:hui-generic-entity-row:美元:| .info.pointer .secondary ha-relative-time{颜色:绿色;}-实体:sun.sun

如何为所有“物品”行+指定一个颜色不同的颜色对于一些“物品”行:
изображение

类型:实体名称:常见的颜色+个人实体:所有项目类型:“自定义:fold-entity-row”风格:“#项目”:hui-text-entity-row:美元:hui-generic-entity-row:美元:| .info.pointer .secondary ha-relative-time{颜色:红色;}:实体:太阳。太阳secondary_info:上次调整填充:15开放:真正的实体:-实体:太阳。太阳的名字:个别颜色secondary_info:上次调整风格:hui-generic-entity-row:美元:| .info.pointer .secondary ha-relative-time{颜色:绿色!重要;}-实体:sun.sunname: common color secondary_info: last-changed - entity: sun.sun name: common color secondary_info: last-changed

如何为所有行+指定一个颜色不同的颜色对于一些“物品”行:
изображение

类型:实体名称:常见的所有行+个人实体:颜色-类型:“自定义:fold-entity-row”风格:hui-text-entity-row:美元:hui-generic-entity-row:美元:| .info.pointer .secondary ha-relative-time{颜色:红色;}“#项目”:hui-text-entity-row: $: hui-generic-entity-row:美元:| .info.pointer .secondary ha-relative-time{颜色:红色;}:实体:太阳。阳光的名字:常见颜色secondary_info:上次调整填充:15开放:真正的实体:-实体:太阳。太阳的名字:个别颜色secondary_info:上次调整风格:hui-generic-entity-row:美元:| .info.pointer .secondary ha-relative-time{颜色:绿色!重要;}-实体:sun.sunname: common color secondary_info: last-changed - entity: sun.sun name: common color secondary_info: last-changed

彩色的图标:
如何为所有行指定一个颜色和不同的颜色对于一些行(“头”或“项目”):
изображение

类型:实体实体:类型:“自定义:fold-entity-row”风格:|:主持人{——paper-item-icon-color:红色;}:实体:太阳。阳光的名字:常见的颜色填充:15开放:真正的实体:-实体:太阳。阳光的名字:个别颜色风格:|:主机{——paper-item-icon-color:橙色;}-实体:sun.sunname: individual color style: | :host { --paper-item-icon-color: green; } - entity: sun.sun name: common color

包装一个文本:
изображение

类型:实体实体:类型:“自定义:fold-entity-row”头:实体:太阳。太阳的名字:裹包包装包裹包装风格:hui-generic-entity-row:美元:| .info.pointer.text-content{颜色:绿色;文本溢出:复原!重要;空白:复原!重要;}填充:15开放:真正的实体:-实体:太阳。太阳的名字:裹包包装包裹包装风格:hui-generic-entity-row:美元:| .info.pointer.text-content{颜色:红色;文本溢出:复原!重要;空白:复原!重要;}-实体:sun.sunname: Not wrapped Not wrapped Not wrapped Not wrapped

彩色雪佛龙按钮:
изображение

类型:实体实体:类型:“自定义:fold-entity-row”风格:ha-icon:美元:| ha-svg-icon{颜色:红色;}:实体:太阳。太阳的名字:彩色按钮填充:15开放:真正的实体:-实体:太阳。太阳-实体:sun.sun

把雪佛龙按钮向右:
默认情况下,按钮不成见是正确的文本边界。
比较这些按钮:
изображение

类型:实体实体:类型:“自定义:fold-entity-row”风格:| ha-icon{宽度:24 px !重要;}hui-text-entity-row {max-width:钙(100%)24 px) !重要;}:实体:太阳。太阳填充:15开放:真正的实体:-实体:太阳。太阳-实体:sun.sun- type: 'custom:fold-entity-row' head: entity: sun.sun padding: 15 open: true entities: - entity: sun.sun - entity: sun.sun

更新18.03.21:这似乎不再需要检查GitHub的问题
在一些版本更正。现在看起来这违约和同样风格的变异看起来:
изображение

如何删除一个雪佛龙按钮可点击标题:
通常按雪佛龙按钮显示的项。
如果“可点击:真正的“属性设置,然后点击显示的物品可能是头。
然后您可以删除雪佛龙按钮:

类型:实体名称:“没有雪佛龙,点击标题”实体:太阳。太阳,太阳。太阳——类型:自定义:fold-entity-row头:实体:太阳。阳光风格:|:主持人{粗细:大胆的;}填充:15开放:真正的可点击:真正的实体:-实体:太阳。太阳-实体:sun.sunstyle: ha-icon: $: | ha-svg-icon { display: none; } .: | ha-icon { width: 0px !important; } .: | hui-text-entity-row { max-width: calc(100%) !important; }

изображение
изображение


更多的例子伟德国际官方app下载苹果版描述在这里

2喜欢

这将是伟大的如果这些例子帮助初学者学习。伟德国际官方app下载苹果版


更新:

实体卡的动画:

闪烁的标题:
注意:保证金为第一行必须增加。
11

类型:实体名称:闪烁的标题图标:mdi:汽车的实体:-实体:太阳。太阳,太阳。太阳的风格:“div: nth-child (1): hui-text-entity-row:美元:| hui-generic-entity-row {margin-top: 10 px;}:| .card-header{背景颜色:红色;颜色:白色;动画:线性交替闪烁2 s无限;{}@keyframes眨眼{0%不透明度:0;}100%{不透明度:1;}}

整个卡闪烁:
hhhhhhhhhhh

类型:实体名称:常见的时尚偶像:mdi:汽车的实体:-实体:传感器。cleargrass_1_co2名称:共同的风格——实体:传感器。cleargrass_1_temp名称:常见的风格风格:| ha-card{颜色:红色;动画:线性交替闪烁2 s无限;{}@keyframes闪烁{0%不透明度:0;}100%{不透明度:1;}}

闪烁的行:
333年

类型:实体名称:常见的时尚偶像:mdi:汽车的实体:-实体:传感器。cleargrass_1_co2名称:共同的风格——实体:传感器。cleargrass_1_temp名称:常见的风格风格:| .card-content{颜色:红色;动画:闪烁0.5年代线性交替无限;{}@keyframes闪烁{0%不透明度:1;}100%{不透明度:0;}}

不同元素闪烁:
ffffffffff

类型:实体名称:常见的时尚偶像:mdi:汽车的实体:太阳。太阳——传感器。cleargrass_1_co2——太阳。阳光风格:hui-text-entity-row: $: hui-generic-entity-row: $: state-badge:美元:ha-icon:美元:| ha-svg-icon{颜色:橙色;动画:线性交替闪烁2 s无限;{}@keyframes闪烁{0%不透明度:0;}100%{不透明度:1;}}:| hui-generic-entity-row .text-content{颜色:红色;动画:线性交替闪烁2 s无限;{}@keyframes闪烁{0%不透明度:0;}100%{不透明度:1;}}hui-sensor-entity-row:美元:hui-generic-entity-row:美元:| .info.pointer.text-content{颜色:红色;动画:线性交替闪烁2 s无限;{}@keyframes闪烁{0%不透明度:0;}100%{不透明度:1;}}.card-header: . name .icon:美元:| ha-svg-icon{颜色:绿色;动画:线性交替闪烁2 s无限; } @keyframes blinking { 0% {opacity: 0;} 100% {opacity: 1;} } .: | .name { color: cyan; animation: blinking 2s linear alternate infinite; } @keyframes blinking { 0% {opacity: 1;} 100% {opacity: 0;} }

闪烁的行元素,个人风格:
xxxxxxxxxxx

类型:实体名称:个人风格图标:mdi:汽车的实体:-实体:太阳。阳光的名字:个人风格风格:hui-generic-entity-row: $: state-badge:美元:ha-icon:美元:| ha-svg-icon{颜色:绿色!重要;动画:线性交替闪烁2 s无限;{}@keyframes眨眼{0%不透明度:1;}{不透明度:0;}}100%。| hui-generic-entity-row .text-content{颜色:红色;动画:线性交替闪烁2 s无限;{}@keyframes闪烁{0%不透明度:0;}100%{不透明度:1;}}-实体:传感器。cleargrass_1_co2名称:个人风格风格:hui-generic-entity-row: $: state-badge:美元:ha-icon:美元:| ha-svg-icon{颜色:红色!重要;动画:线性交替闪烁2 s无限;{}@keyframes眨眼{0%不透明度:0;}100%{不透明度:1;}}:| .info.pointer.text-content{颜色:红色;动画:线性交替闪烁2 s无限; } @keyframes blinking { 0% {opacity: 0;} 100% {opacity: 1;} }

动画图标:

类型:实体实体:实体:太阳。阳光的名字:旋转图标:mdi:风扇的风格:hui-generic-entity-row:美元:state-badge:美元:ha-icon:美元:| ha-svg-icon{颜色:橙色;动画:旋转0.5年代线性无限;{}@keyframes旋转{0%变换:旋转(0度);}100%{变换:旋转(360度);}}-实体:太阳。阳光的名字:摆动图标:mdi:贝尔的风格:hui-generic-entity-row:美元:| state-badge{颜色:红色;动画:摇摆不定1 s线性无限备用;}@keyframes摆动{0%{变换:旋转(-45度);}100%{变换:旋转45度(+); } } - entity: sun.sun name: coloring style: hui-generic-entity-row: $: | state-badge { animation: coloring 8s linear infinite alternate; } @keyframes coloring { 0% { color: red; } 17% { color: orange; } 34% { color: yellow; } 51% { color: green; } 68% { color: lightblue; } 85% { color: blue; } 100% { color: violet; } } - entity: sun.sun name: resizing icon: 'mdi:radio-tower' style: hui-generic-entity-row: $: | state-badge { animation: resizing 1s linear infinite alternate; } @keyframes resizing { 0% { --mdc-icon-size: 10px; } 25% { --mdc-icon-size: 15px; } 50% { --mdc-icon-size: 20px; } 75% { --mdc-icon-size: 26px; } 100% { --mdc-icon-size: 32px; } } - entity: sun.sun name: stretching 1 icon: 'mdi:bus-side' style: hui-generic-entity-row: $: | state-badge { animation: stretching 1s linear infinite alternate; } @keyframes stretching { 0% { transform: scaleX(0.5); } 100% { transform: scaleX(2.0); } } - entity: sun.sun name: stretching 2 icon: 'mdi:human-handsup' style: hui-generic-entity-row: $: | state-badge { animation: stretching 1s linear infinite alternate; } @keyframes stretching { 0% { transform: scaleY(0.5); } 100% { transform: scaleY(2.0); } } - entity: sun.sun name: flipping icon: 'mdi:timer-sand' style: hui-generic-entity-row: $: | state-badge { animation: flipping 1s linear infinite; } @keyframes flipping { 0% { transform: rotateX(0deg); } 100% { transform: rotateX(360deg); } } - entity: sun.sun name: shifting icon: 'mdi:arrow-left-right' style: hui-generic-entity-row: $: | state-badge { animation: shifting 1s linear infinite alternate; } @keyframes shifting { 0% { transform: translate(-5px,0); } 100% { transform: translate(5px,0); } } - entity: sun.sun name: jumping icon: 'mdi:arrow-up-down' style: hui-generic-entity-row: $: | state-badge { animation: jumping 1s linear infinite alternate; } @keyframes jumping { 0% { transform: translate(0,-5px); } 100% { transform: translate(0,5px); } } - entity: sun.sun name: blinking style: hui-generic-entity-row: $: | state-badge { animation: disappear 1s linear infinite alternate; } @keyframes disappear { 0% { opacity: 0; } 100% { opacity: 1; } }

更多的例子伟德国际官方app下载苹果版描述在这里

2喜欢

你好,

我试图改变文本的大小光卡和我显然不了解足够的css。下面是我和我试着多个变种,但我似乎无法让它工作。

类型:光
实体:light.kitchen_lights
风格:|
ha-card {
——name-font-size: 10 px;
}

如何改变字体大小为实体卡:
изображение

标题:类型:实体大小标题风格:| ha-card .card-header{字体大小:35 px;颜色:红色;实体}:实体:sun.sunname: Standard size secondary_info: last-changed - entity: sun.sun name: Size for whole row secondary_info: last-changed style: | :host { font-size: 25px; color: red; } - entity: sun.sun name: Size for name & secondary_info secondary_info: last-changed style: hui-generic-entity-row: $: | .info.pointer { font-size: 10px; color: red; } - entity: sun.sun name: Size for name & secondary_info (different) secondary_info: last-changed style: hui-generic-entity-row: $: .info.pointer: | .secondary ha-relative-time { color: green; font-size: 25px; } .: | .info.pointer { color: red; font-size: 8px; } - entity: sun.sun name: Size for name only secondary_info: last-changed style: hui-generic-entity-row: $: .info.pointer: | .secondary ha-relative-time { color: orange; font-size: var(--mdc-typography-body1-font-size, 1rem); } .: | .info.pointer { color: red; font-size: 8px; } - entity: sun.sun name: Size for value secondary_info: last-changed style: | :host .text-content { font-size: 10px; color: red; } - entity: sun.sun name: Size for secondary_info secondary_info: last-changed style: hui-generic-entity-row: $: .info.pointer .secondary: | ha-relative-time { font-size: 20px; color: green !important; }

注意,设置一个“标准”字体大小我不得不使用字体大小:var (rem mdc-typography-body1-font-size, 1)”“名字只是大小”情况下,我不认为这是好的(“硬编码”),并可能有一个更好的解决办法…

改变标题的字体大小的另一个选择——使用”——ha-card-header-font-size”变量:
изображение

类型:实体名称:样式:标题字体大小的实体:-实体:太阳。阳光风格:| ha-card {——ha-card-header-font-size: 35 px;}

如何改变字体大小的吗“按钮”行:
图像

标题:类型:实体大小按钮实体:-类型:按钮名称:标准尺寸tap_action:行动:调用服务服务:homeassistant。update_entity service_data: entity_id:太阳。太阳-类型:按钮名称:标准尺寸tap_action:行动:调用服务服务:homeassistant。update_entity service_data: entity_id:太阳。太阳card_mod:风格:|:主持人{——mdc-typography-button-font-size: 20 px;}

更多的例子伟德国际官方app下载苹果版描述在这里

你能使用三重引号而不是单一的吗?

对不起,显然我不是关注不够,警告说,突然出现。这丫去:

类型:光实体:光。kitchen_lights风格:| ha-card {——name-font-size: 10 px;}

我真正要做的是减少所有的灯牌,大概是一个自定义的按钮的大小卡,但我不确定是否我需要做零碎的或如果它可以用一个整体的代码。

实际上,你可以试着这样的:


不能检查它因为到目前为止我没有任何灯光。

是否可以调整卡大小与卡国防部?刚刚安装卡国防部,但仍试图找出如何调整卡的大小。

提前谢谢。