一个好玩的日出/日落卡片
本帖最后由 hudan717 于 2022-8-4 12:38 编辑日常发现一个好玩的小卡片,整体效果如下
卡片单独效果
当然如果觉得元素重复的话,也可以单独把chips拆开来配合天气使用
卡片名称:Sun card hacs直接搜索即可 Git地址:https://github.com/AitorDB/home-assistant-sun-card
当然问题是有的,原卡片不支持中文,请在7楼领取汉化包
效果就是这样的
当然,上面这些东西的前提是你有装了对应的集成,太阳集成搜索"sun",月亮集成搜索“moon”
整体代码如下,按需自取
square: false
columns: 1
type: grid
cards:
- type: vertical-stack
cards:
- type: custom:mushroom-chips-card
chips:
- type: template
content: >-
日出{% if states.sun.sun %} {{
(as_timestamp(states.sun.sun.attributes.next_rising)) |
timestamp_custom(('%H:%M') )}} {% endif %}
icon: mdi:weather-sunset-up
icon_color: '#e3d123'
- type: template
content: >-
日落{% if states.sun.sun %} {{
(as_timestamp(states.sun.sun.attributes.next_setting)) |
timestamp_custom(('%H:%M') )}} {% endif %}
icon: mdi:weather-sunset-down
icon_color: '#e75454'
- type: entity
entity: sensor.moon
icon_color: '#c4c8b7'
- type: custom:weather-card
entity: weather.dong_qian_hu
houer_forecast: false
show_forecast: true
icon: /hacsfiles/lovelace-colorfulclouds-weather-card/icons/animated/
name: ''
secondary_info_attribute: humidity
- square: false
columns: 1
type: grid
cards:
- type: custom:sun-card
showElevation: false
showAzimuth: false
language: de
大胡出品,必属精品:lol :)抄作业,走起!哈哈哈 大佬真的666 给大呼哥点赞 感谢楼主分享。
按楼主的方法修改了一点点,完善一下,增加中文简体和中文繁體。如果是hacs安装原版的,附件替换到config/www/community/home-assistant-sun-card,未设置 language 时,自动根据ha用户设置的语言显示。 dscao 发表于 2022-8-3 20:56
感谢楼主分享。
按楼主的方法修改了一点点,完善一下,增加中文简体和中文繁體。如果是hacs安装原版的,附 ...
嘿嘿,感谢大佬出手~ 我替换装了以后还是英文的 dscao 发表于 2022-8-3 20:56
感谢楼主分享。
按楼主的方法修改了一点点,完善一下,增加中文简体和中文繁體。如果是hacs安装原版的,附 ...
感谢大佬出手, ilongjiang 发表于 2022-8-4 06:51
我替换装了以后还是英文的
你可以按7楼大佬的替换文件,我也和你一样问题,替换后好了