Homeassistant在Picture-Element-Card中集成Iframe

前言

Ha默认的Iframe卡片在使用Picture-Element的卡片中无法使用会出现报错,因此搜索Google发现在论坛中的:iFrame in picture-elements panel view? - Configuration / Frontend - Home Assistant Community (home-assistant.io) 可以解决这个问题

插件地址:GitHub - lukevink/home-assistant-custom-iframe: Custom iFrame card to be used with Picture elements card

安装

在Homeassistant中下载上述的卡片仓库,按照导入说明进行导入即可
在 配置-> 仪表盘 -> 左上角资源(添加上述仓库js文件)-> 重新启动Hass
卡片示例:

1
2
3
4
5
6
7
type: 'custom:custom-iframe'
url: www.google.com
style:
left: 50%
top: 50%
width: 50%
height: 50%