|
发表于 2020-6-19 12:36:28
|
显示全部楼层
主卧面板
上面这就是我做的hadashboard面板中的一个屏幕,用的三星旧手机手机做的(还有一个集合的页面用大的平板放到入户墙上去了)。左侧是导航栏,右侧是相应的信息。在appdaemon中建立一个dash文件,里面有内容:
title: Room Panel
widget_dimensions: [110, 98] #这个里面的数字根据自己设备的分辨率去调整。
widget_margins: [5, 5]
widget_size: [1, 1]
columns: 8
global_parameters:
use_comma: 0
precision: 1
use_hass_icon: 1
label1:
widget_type: label
text: 常用场景
value_style: "color: yellow;font-size: 150%"
label6:
widget_type: label
text: 室外天气
value_style: "color: yellow;font-size: 150%"
label7:
widget_type: label
text: 交通信息
value_style: "color: yellow;font-size: 150%"
label8:
widget_type: label
text: 卧室环境
value_style: "color: yellow;font-size: 150%"
shiwaiwendu:
widget_type: sensor
title: 室外温度
units: '℃'
entity: weather.hfweather.temperature
shiwaishidu:
widget_type: sensor
title: 室外湿度
units: '%'
entity: weather.hfweather.humidity
shiwaiqiya:
widget_type: sensor
title: 室外气压
units: 'mbar'
entity: weather.hfweather.pressure
shiwaifensu:
widget_type: sensor
title: 室外风速
units: 'km/h'
entity: weather.hfweather.wind_speed
tianqi:
widget_type: sensor
title: 室外天气
entity: weather.hfweather.condition_cn
text_style: "color: red;font-size: 200%"
alarm1:
widget_type: alarm
entity: alarm_control_panel.my_home_alarm
title: 警戒面板
title_style: "color: white;font-size: 150%"
state_style: "color: red;font-size: 200%"
all_sensors_panel:
widget_type: navigate
title: 传感器
dashboard: all_sensors_panel
icon_inactive: mdi-android-messages
args:
timeout: 600
return: main
all_switch_panel:
widget_type: navigate
title: 开关
dashboard: all_switch_panel
icon_inactive: mdi-dip-switch
args:
timeout: 600
return: main
kecanting_panel:
widget_type: navigate
title: 客餐厅
dashboard: kecanting_panel
args:
timeout: 600
return: main
mainroom_panel:
widget_type: navigate
title: 主卧
dashboard: mainroom_panel
icon_inactive: fa-bed
args:
timeout: 600
return: main
main:
widget_type: navigate
title: 首页(客厅)
dashboard: main
traffic:
widget_type: sensor
entity: sensor.traffic_home_to_office
title: XXX→XXX ##就是图中隐藏的,用百度交通查询两地之间交通所需时间。
reload:
widget_type: reload
title: 刷新
layout:
- main,clock.clock(2x1),tianqi,shiwaiwendu,shiwaishidu,shiwaifensu,shiwaiqiya
- mainroom_panel,alarm1(2x1),traffic(2x1),label8,sensor.temperature_158d0001f53b3e,sensor.humidity_158d0001f53b3e
- all_switch_panel,person.XXX,person.XXX,switch.wall_switch_ln_right_158d000409361f,switch.wall_switch_ln_left_158d000409361f,switch.wall_switch_ln_right_158d0004614660,light.sl_li_rgbw_a3maaabkadonrzuwnjy0nw_2714_rgbw,light.sl_li_rgbw_a3maaabkadonrzuwnjy0nw_2715_rgbw
- all_sensors_panel,label1(1x2),scene.watching_tv(2x1),scene.guan_zhu_wo_suo_you_deng(2x1),scene.wu_rao_mo_shi(2x1)
- reload,scene.wan_shang_shui_jue(2x1),scene.ke_ting_wu_ren_mo_shi(2x1),scene.jie_chu_wu_rao_aut(2x1)
|
|