首页 智能家居homeassistant正文

教程:Floorplan之配置floorplan.yaml

仁镜 homeassistant 2019-11-20 21:14:08 1735 0 Floorplan

将文件中warnings、pan_zoom和hide_app_toolbar前的注释去除。
warnings:是否在前端显示错误警示。
pan_zoom:图形是否可以手动伸缩大小
hide_app_toolbar:是否隐藏标题栏(标题栏隐藏更适合全屏显示)

在floorplan.yaml中完整地配置您在定制页面要显示的内容(具体内容参见下面注释部分,您需要根据您家中设备情况设置不同的组和entities):



      name: Demo Floorplan
      image: /local/custom_ui/floorplan/floorplan.svg
      stylesheet: /local/custom_ui/floorplan/floorplan.css
      
      # These options are optional
      # 是否在前端显示错误警示
      warnings:                  # enable warnings (to find out why things might ot be working correctly)
      # 图形是否可以手动伸缩大小
      pan_zoom:                  # enable experimental panning / zooming
      # 是否隐藏标题栏(标题栏隐藏更适合全屏显示)
      hide_app_toolbar:          # hide the application toolbar (when used as a custom panel)
      date_format: DD-MMM-YYYY   # Date format to use in hover-over text
      
      last_motion_entity: sensor.template_last_motion
      last_motion_class: last-motion
 
      groups:
 
        # 随便取个名字,包含所有在SVG文件中的摄像头
        - name: Cameras
          entities:
            - camera.camera1
 
        # 随便取个名字,包含所有在SVG文件中的灯
        - name: Lights
          entities:
             - light.bed_room
             - light.living_room1
             - light.living_room2
             - light.bathroom
             - light.kitchen
 
        # 因为温度的定制化显示与其它传感器不同,我们将其单独一个组
        - name: Temperature
          entities:
             - sensor.hachina_temperature
             - sensor.temperature1
 
        # 因为湿度的定制化显示与其它传感器不同,我们将其单独一个组
        - name: Humidity
          entities:
             - sensor.hachina_humidity
             - sensor.humidity1
 
        # pm2.5传感器信息
        - name: PM25
          entities:
             - sensor.hachina_pm25

重新启动hass后,您将看到以下的界面(传感器显示真实的值了,并且页面各个元素都可以被点击弹出操作界面了)。

1.png

版权声明

1.本站大部分下载资源收集于网络,不保证其完整性以及安全性,请下载后自行测试。
2.本站资源仅供学习和交流使用,版权归资源原作者所有,请在下载后24小时之内自觉删除。
3.若作商业用途,请购买正版,由于未及时购买和付费发生的侵权行为,与本站无关。
4.若内容涉及侵权或违法信息,请联系本站管理员进行下架处理,邮箱ganice520@163.com(本站不支持其他投诉反馈渠道,谢谢合作)

本文链接:http://www.apod.cc/index.php/post/128.html

发表评论

评论列表(0人评论 , 1735人围观)
☹还没有评论,来说两句吧...