『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 4479|回复: 7

[技术探讨] [求助]lovelace控制界面怎么安装?求指导

[复制链接]

57

主题

629

帖子

3858

积分

论坛元老

Rank: 8Rank: 8

积分
3858
金钱
3224
HASS币
20
发表于 2019-9-4 17:13:00 | 显示全部楼层 |阅读模式
https://bbs.hassbian.com/forum.php?mod=viewthread&tid=7105&extra=&highlight=%E6%9E%81%E7%B1%B3&page=1
想要实现控制极米根据上面操作来的第四步
四、lovelace创建控制界面。

1、安装button_card插件。
插件地址  :https://github.com/custom-cards/button-card
到这里不是怎么了?  把上面全部下载解压放在 .homeassistant\www 再原始配置编辑器后出现
微信截图_20190904171153.png
回复

使用道具 举报

24

主题

623

帖子

2770

积分

金牌会员

Rank: 6Rank: 6

积分
2770
金钱
2137
HASS币
40
发表于 2019-9-4 21:04:53 | 显示全部楼层
不需要全都放进去,只要把button-card.js文件放入即可。
button-card.js.zip (23.98 KB, 下载次数: 38)

回复

使用道具 举报

24

主题

623

帖子

2770

积分

金牌会员

Rank: 6Rank: 6

积分
2770
金钱
2137
HASS币
40
发表于 2019-9-4 21:07:46 | 显示全部楼层
另外新建一个manual card,格式 如下

cards:
  - cards:
      - color: 'rgb(255, 100, 100)'
        entity: null
        icon: 'mdi:power'
        show_name: false
        styles:
          card:
            - height: 65px
            - width: 65px
        tap_action:
          action: call-service
          service: mqtt.publish
          service_data:
            payload: power
            topic: homeassistant/remote/GIMI
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        entity: null
        icon: 'mdi:menu-up'
        show_name: false
        styles:
          card:
            - height: 65px
            - width: 65px
        tap_action:
          action: call-service
          service: mqtt.publish
          service_data:
            payload: up
            topic: homeassistant/remote/GIMI
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        entity: null
        icon: 'mdi:home'
        styles:
          card:
            - height: 65px
            - width: 65px
        tap_action:
          action: call-service
          service: mqtt.publish
          service_data:
            payload: home
            topic: homeassistant/remote/GIMI
        type: 'custom:button-card'
    type: horizontal-stack
  - cards:
      - color: 'rgb(255, 100, 100)'
        entity: null
        icon: 'mdi:settings'
        styles:
          card:
            - height: 65px
            - width: 65px
        tap_action:
          action: call-service
          service: mqtt.publish
          service_data:
            payload: set_up
            topic: homeassistant/remote/GIMI
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        entity: null
        icon: 'mdi:menu-left'
        show_name: false
        styles:
          card:
            - height: 65px
            - width: 65px
        tap_action:
          action: call-service
          service: mqtt.publish
          service_data:
            payload: left
            topic: homeassistant/remote/GIMI
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        color_type: card
        entity: null
        icon: 'mdi:play-pause'
        name: OK
        show_icon: false
        styles:
          card:
            - height: 65px
            - width: 65px
        tap_action:
          action: call-service
          service: mqtt.publish
          service_data:
            payload: pause&play
            topic: homeassistant/remote/GIMI
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        entity: null
        icon: 'mdi:menu-right'
        show_name: false
        styles:
          card:
            - height: 65px
            - width: 65px
        tap_action:
          action: call-service
          service: mqtt.publish
          service_data:
            payload: right
            topic: homeassistant/remote/GIMI
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        entity: null
        icon: 'mdi:menu'
        styles:
          card:
            - height: 65px
            - width: 65px
        tap_action:
          action: call-service
          service: mqtt.publish
          service_data:
            payload: menu
            topic: homeassistant/remote/GIMI
        type: 'custom:button-card'
    type: horizontal-stack
  - cards:
      - color: 'rgb(255, 100, 100)'
        entity: null
        icon: 'mdi:keyboard-backspace'
        styles:
          card:
            - height: 65px
            - width: 65px
        tap_action:
          action: call-service
          service: mqtt.publish
          service_data:
            payload: back
            topic: homeassistant/remote/GIMI
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        color_type: card
        icon: 'mdi:volume-plus'
        styles:
          card:
            - height: 65px
            - width: 65px
        tap_action:
          action: call-service
          service: mqtt.publish
          service_data:
            payload: vol+
            topic: homeassistant/remote/GIMI
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        entity: null
        icon: 'mdi:menu-down'
        show_name: false
        styles:
          card:
            - height: 65px
            - width: 65px
        tap_action:
          action: call-service
          service: mqtt.publish
          service_data:
            payload: down
            topic: homeassistant/remote/GIMI
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        color_type: card
        icon: 'mdi:volume-minus'
        styles:
          card:
            - height: 65px
            - width: 65px
        tap_action:
          action: call-service
          service: mqtt.publish
          service_data:
            payload: vol-
            topic: homeassistant/remote/GIMI
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
        entity: null
        icon: 'mdi:volume-mute'
        styles:
          card:
            - height: 65px
            - width: 65px
        tap_action:
          action: call-service
          service: mqtt.publish
          service_data:
            payload: mute
            topic: homeassistant/remote/GIMI
        type: 'custom:button-card'
    type: horizontal-stack
type: vertical-stack


回复

使用道具 举报

57

主题

629

帖子

3858

积分

论坛元老

Rank: 8Rank: 8

积分
3858
金钱
3224
HASS币
20
 楼主| 发表于 2019-9-4 23:26:20 | 显示全部楼层
sasukebinbin 发表于 2019-9-4 21:07
另外新建一个manual card,格式 如下

QQ截图20190904232407.png
添加后还是不行 www是在 .homeassistant\www 这样的路劲吗

回复

使用道具 举报

24

主题

623

帖子

2770

积分

金牌会员

Rank: 6Rank: 6

积分
2770
金钱
2137
HASS币
40
发表于 2019-9-4 23:33:02 | 显示全部楼层
本帖最后由 sasukebinbin 于 2019-9-4 23:34 编辑

我的homeassistant是在docker下安装的,所以路径是把config映射到了homeassistant,路径就是homeassistant/www/button-card.js. 如果你homeassistant下面还有config文件夹,那www应该在config里面。

另外你原始编辑器里面,添加的  
  - type: module
    url: /local/button-card.js?v=0.0.4
写的对吗
回复

使用道具 举报

57

主题

629

帖子

3858

积分

论坛元老

Rank: 8Rank: 8

积分
3858
金钱
3224
HASS币
20
 楼主| 发表于 2019-9-5 00:10:40 | 显示全部楼层
sasukebinbin 发表于 2019-9-4 23:33
我的homeassistant是在docker下安装的,所以路径是把config映射到了homeassistant,路径就是homeassistant/w ...

哈哈我是小白还是搞不懂可以 发你一个完整的原始配置我看下吗
回复

使用道具 举报

3

主题

217

帖子

1443

积分

金牌会员

Rank: 6Rank: 6

积分
1443
金钱
1226
HASS币
10
发表于 2019-9-5 10:17:48 | 显示全部楼层
学习一下
回复

使用道具 举报

0

主题

24

帖子

131

积分

注册会员

Rank: 2

积分
131
金钱
107
HASS币
0
发表于 2023-8-6 18:20:42 | 显示全部楼层
试了半天还是没成功
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-15 11:00 , Processed in 1.190212 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表