找回密码
 立即注册

微信扫码登录

搜索
查看: 4221|回复: 8

[技术探讨] 有哪些大神能出个新ha-floorplan的安装和使用手册吗

[复制链接]

0

主题

71

回帖

815

积分

高级会员

积分
815
金钱
744
HASS币
0
发表于 2022-1-17 22:27:14 | 显示全部楼层
type: custom:floorplan-card
config:
  image: /local/floorplan/myhome/我的家.svg
  stylesheet: /local/floorplan/myhome/myhome1.css
  defaults:
    hover_action: hover-info
    tap_action: more-info
    hold_action: more-info
    action: toggle
  rules:
    - entities:
        - switch.sonoff_10012cba15_2
        - switch.sonoff_10012cba15_1
        - light.sonoff_1000fc832c
        - switch.sonoff_100124d353_1
        - switch.sonoff_100124d353_2
        - switch.can_ting_deng
        - switch.sonoff_10013d3ebe_1
        - switch.sonoff_100124d525_2
        - switch.sonoff_100124d525_1
        - light.ec4d3eda59e2_light
      state_action:
        - action: call-service
          service: floorplan.image_set
          service_data: /local/floorplan/myhome/li2_${entity.state}.svg
      tap_action: toggle
    - entities:
        - sensor.wei_sheng_jian_wen_shi_du_temperature
        - sensor.0x158d0002009ac0_temperature
        - sensor.a4c13813e29c_temperature
        - sensor.wen_du
        - sensor.shui_wen
      state_action:
        - action: call-service
          service: floorplan.text_set
          service_data: >-
            ${(entity.state !== undefined) ? Math.round(entity.state * 10) / 10
            + "℃" : "unknown"}
        - service: floorplan.class_set
          service_data:
            class: static-temp
    - entities:
        - sensor.wei_sheng_jian_wen_shi_du_humidity
        - sensor.0x158d0002009ac0_humidity
        - sensor.a4c13813e29c_humidity
        - sensor.shi_du
      state_action:
        - action: call-service
          service: floorplan.text_set
          service_data: ${entity.state }%
        - service: floorplan.class_set
          service_data:
            class: static-temp
    - entities:
        - light.xiao_mi_tai_deng
      state_action:
        - action: call-service
          service: floorplan.image_set
          service_data: /local/floorplan/myhome/taideng_${entity.state}.svg
      tap_action: toggle
    - entities:
        - script.1638165553527
        - script.1638165602593
        - script.1638094387338
        - switch.ricoh_tou_ying_yi
      state_action:
        - action: call-service
          service: floorplan.image_set
      tap_action: toggle
    - entities:
        - device_tracker.zj
        - device_tracker.zyl
        - device_tracker.lqj
      state_action:
        - action: call-service
          service: floorplan.image_set
          service_data: /local/floorplan/myhome/home_${entity.state}.svg
    - name: Rooms
      entities:
        - entity: switch.sonoff_10012cba15_2
          element: area.keting
        - entity: switch.sonoff_10012cba15_1
          element: area.keting1
        - entity: light.ec4d3eda59e2_light
          element: area.canting
        - entity: switch.sonoff_100124d353_1
          element: area.wode
        - entity: switch.sonoff_100124d353_2
          element: area.wode1
        - entity: switch.sonoff_100124d525_2
          element: area.zyl
        - entity: switch.sonoff_100124d525_1
          element: area.zyl1
        - entity: switch.sonoff_10013d3ebe_1
          element: area.beicewoshi
      tap_action: toggle
      state_action:
        service: floorplan.class_set
        service_data: '${(entity.state === "on") ? "light-on" : "light-off"}'
    - name: Rooms1
      entities:
        - entity: light.sonoff_1000fc832c
          element: area.ketingbideng
        - entity: switch.ec4d3ec2565d_outlet
          element: area.switch.ec4d3ec2565d_outlet
        - entity: climate.xiao_mi_kong_diao_ban_lu
          element: area.kongtiao
        - entity: device_tracker.ricoh
          element: area.touyin
      tap_action: toggle
      state_action:
        service: floorplan.class_set
        service_data: '${(entity.state === "off") ? "light-on" : "light-off" }'
    - entities:
        - device_tracker.ricoh
      state_action:
        - action: call-service
          service: floorplan.image_set
          service_data: /local/floorplan/myhome/投影仪_${entity.state}.svg
    - entity: switch.sonoff_10012cba15_1
      tap_action: false
      state_action:
        action: call-service
        service: floorplan.class_set
        service_data:
          class: '${(entity.state === "on") ? "spinning" : ""}'
    - entities:
        - switch.kai_guan
      state_action:
        - action: call-service
          service: floorplan.image_set
          service_data: /local/floorplan/myhome/kg_${entity.state}.svg
      tap_action: toggle
    - name: Rooms2
      entities:
        - entity: device_tracker.ricoh
          element: area.touyin
        - entity: device_tracker.ricoh
          element: area.switch.ricoh_tou_ying_yi
      tap_action: toggle
      state_action:
        service: floorplan.class_set
        service_data: '${(entity.state === "not_home") ? "light-on" : "light-off" }'
    - entity: switch.sonoff_10012cba15_1
      tap_action: false
      state_action:
        action: call-service
        service: floorplan.class_set
        service_data:
          class: '${(entity.state === "on") ? "spinning" : ""}'
回复

使用道具 举报

0

主题

71

回帖

815

积分

高级会员

积分
815
金钱
744
HASS币
0
发表于 2022-1-17 22:28:42 | 显示全部楼层
没有图形化,我试着用上面的代码能用一部分功能,但动画还没成功。
回复

使用道具 举报

0

主题

71

回帖

815

积分

高级会员

积分
815
金钱
744
HASS币
0
发表于 2023-7-17 23:32:29 | 显示全部楼层
现在能实现部分动画了,比如转动、隐藏、呼吸效果等。
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )

GMT+8, 2025-9-10 06:26 , Processed in 0.057267 second(s), 12 queries , MemCached On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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