本帖最后由 shadowba 于 2022-8-9 08:44 编辑
做做停停,汽车中控终于告一段落,看着奇丑无比的控制界面,全是开关和传感器,唉。。。。要不咱模仿一个???
更新esphome代码,汽车中控DIY,都说8266太累了,改用esp3... - 『HomeAssistant』综合讨论区 - 『瀚思彼岸』» 智能家居技术论坛 - Powered by Discuz! (hassbian.com)
晒一下我的改的新能源汽车控制界面 - 『HomeAssistant』综合讨论区 - 『瀚思彼岸』» 智能家居技术论坛 - Powered by Discuz! (hassbian.com)
上锁/开锁、引擎启动/停止、充电/非充电等都可以直观看到,上图是在车辆上锁且充电中的截图
求助,如何读取新能源汽车的电量?
type: picture-elements
elements:
- type: image
image: /local/car/changcheng_logo.webp
tap_action:
action: none
style:
top: 8%
left: 15%
width: 22%
hold_action:
action: none
- type: image
entity: binary_sensor.d34_car_charging
state_image:
'on': /local/C30EV/status_scan_item_charge.png
'off': /local/C30EV/nocharge.webp
style:
top: 23%
left: 85%
width: 9%
hold_action:
action: none
tap_action:
action: none
- type: image
entity: binary_sensor.d34_car_charging
state_image:
'on': /local/C30EV/battery_highlight_nor.png
'off': /local/car/battery_gray_bottom.png
state_filter:
'off': brightness(60%)
style:
top: 23%
left: 85%
width: 16%
hold_action:
action: none
- type: image
image: /local/C30EV/home_display_car_platform.webp
tap_action:
action: none
style:
top: 40%
left: 50%
width: 80%
hold_action:
action: none
- type: image
image: /local/C30EV/home_display_car_battery_percent.webp
tap_action:
action: none
style:
top: 40%
left: 50%
width: 80%
hold_action:
action: none
- type: image
image: /local/C30EV/mycenter_icon_car.webp
tap_action:
action: none
style:
top: 35%
left: 50%
width: 80%
hold_action:
action: none
- type: image
entity: binary_sensor.d34_car_charging
state_image:
'on': /local/C30EV/battery_img_deblocking_charge.webp
'off': /local/car/nothing.webp
style:
top: 19%
left: 59.5%
width: 90%
hold_action:
action: none
tap_action:
action: none
- type: image
entity: binary_sensor.d23_car_lock
state_image:
'on': /local/C30EV/control_img_lock.webp
'off': /local/C30EV/control_img_unlock.webp
style:
top: 22%
left: 50%
width: 80%
hold_action:
action: none
tap_action:
action: none
- type: image
entity: binary_sensor.vn_car_engine
state_image:
'on': /local/car/control_img_engine.webp
'off': /local/car/nothing.webp
style:
top: 45%
left: 20%
width: 80%
hold_action:
action: none
tap_action:
action: none
- type: image
image: /local/C30EV/group_chat_btn.webp
tap_action:
action: none
style:
top: 50%
left: 30%
width: 30%
hold_action:
action: none
- type: image
image: /local/C30EV/xudianchi.png
tap_action:
action: none
style:
top: 50%
left: 10%
width: 6%
hold_action:
action: none
- type: state-label
entity: sensor.vp_car_battery_voltage
prefix: 蓄电池
style:
top: 50%
left: 30%
font-size: 10px
color: rgb(90,90,90)
- type: image
image: /local/C30EV/group_chat_btn.webp
tap_action:
action: none
style:
top: 50%
left: 80%
width: 30%
hold_action:
action: none
- type: image
image: /local/C30EV/temperature.webp
tap_action:
action: none
style:
top: 50%
left: 60%
width: 7%
hold_action:
action: none
- type: state-label
entity: sensor.d5_car_temperature
prefix: 车内温度
style:
top: 50%
left: 80%
font-size: 10px
color: rgb(90,90,90)
- type: image
image: /local/C30EV/group_chat_btn.webp
tap_action:
action: none
style:
top: 55%
left: 30%
width: 30%
hold_action:
action: none
- type: state-icon
entity: binary_sensor.d32_car_parking_lights
style:
top: 55%
left: 10%
'--paper-item-icon-color': rgb(0,142,142)
hold_action:
action: none
tap_action:
action: none
- type: state-label
entity: binary_sensor.d32_car_parking_lights
prefix: 示廓灯传感器
style:
top: 55%
left: 30%
font-size: 10px
color: rgb(90,90,90)
- type: image
image: /local/C30EV/group_chat_btn.webp
tap_action:
action: none
style:
top: 55%
left: 80%
width: 30%
hold_action:
action: none
- type: state-icon
entity: binary_sensor.d33_car_light_dimmed_light
style:
top: 55%
left: 60%
'--paper-item-icon-color': rgb(0,142,142)
hold_action:
action: none
tap_action:
action: none
- type: state-label
entity: binary_sensor.d33_car_light_dimmed_light
prefix: 近光灯传感器
style:
top: 55%
left: 80%
font-size: 10px
color: rgb(90,90,90)
- type: image
entity: switch.car_ev_plug
title: 油箱盖
image: /local/car/battery_icon_charging_gun_big.png
filter: saturate(.7)
state_filter:
'on': brightness(150%) saturate(3)
hold_action:
action: toggle
style:
top: 75%
left: 10%
width: 9%
tap_action:
action: none
- type: state-label
entity: switch.car_ev_plug
prefix: 油箱盖
style:
top: 79%
left: 10%
font-size: 13px
color: rgb(90,90,90)
- type: image
entity: switch.car_key
title: 开/锁车
image: /local/car/home_icon_lock_active_nor.webp
filter: saturate(.7)
state_filter:
'on': brightness(150%) saturate(3)
hold_action:
action: toggle
style:
top: 75%
left: 30%
width: 12%
tap_action:
action: none
- type: state-label
entity: binary_sensor.d23_car_lock
prefix: 车锁
style:
top: 79%
left: 30%
font-size: 13px
color: rgb(90,90,90)
- type: image
entity: switch.car_light_dimmed
title: 示廓灯
image: /local/car/home_icon_flashing_active_nor.webp
filter: saturate(.7)
state_filter:
'on': brightness(150%) saturate(3)
hold_action:
action: toggle
style:
top: 86%
left: 70%
width: 12%
tap_action:
action: none
- type: state-label
entity: switch.car_light_dimmed
prefix: 示廓灯
style:
top: 90%
left: 70%
font-size: 13px
color: rgb(90,90,90)
- type: image
entity: binary_sensor.vn_car_engine
title: 启动/停止
image: /local/car/img_park_slide_bock.webp
style:
top: 80%
left: 50%
width: 17%
tap_action:
action: none
- type: image
entity: switch.car_one_key_start
title: 启动/停止
image: /local/car/icon_mass_quit.png
filter: saturate(0)
state_filter:
'on': brightness(150%) saturate(3)
hold_action:
action: toggle
style:
top: 80%
left: 50%
width: 15%
tap_action:
action: none
- type: state-label
entity: binary_sensor.vn_car_engine
prefix: 引擎
style:
top: 86%
left: 50%
font-size: 13px
color: rgb(90,90,90)
- type: image
entity: switch.car_back
title: 尾箱
image: /local/car/home_icon_trunk_active_nor.webp
filter: saturate(.7)
state_filter:
'on': brightness(150%) saturate(3)
hold_action:
action: toggle
style:
top: 75%
left: 70%
width: 12%
tap_action:
action: none
- type: state-label
entity: switch.car_back
prefix: 后备箱
style:
top: 79%
left: 70%
font-size: 13px
color: rgb(90,90,90)
- type: image
entity: switch.car_whistle
title: 鸣笛
image: /local/car/home_icon_whistle_active_nor.webp
filter: saturate(.7)
state_filter:
'on': brightness(150%) saturate(3)
hold_action:
action: toggle
style:
top: 75%
left: 90%
width: 12%
tap_action:
action: none
- type: state-label
entity: switch.car_whistle
prefix: 鸣笛
style:
top: 79%
left: 90%
font-size: 13px
color: rgb(90,90,90)
- type: image
entity: switch.car_break_light
title: 刹车灯
image: /local/car/home_icon_remote_park_active_nor.png
filter: saturate(.7)
state_filter:
'on': brightness(150%) saturate(3)
hold_action:
action: toggle
style:
top: 86%
left: 10%
width: 12%
tap_action:
action: none
- type: state-label
entity: switch.car_break_light
prefix: 刹车灯
style:
top: 90%
left: 10%
font-size: 13px
color: rgb(90,90,90)
- type: image
entity: switch.d12_car_a_c_on
title: 空调开
image: /local/car/home_icon_air_active_nor.webp
filter: saturate(.7)
state_filter:
'on': brightness(150%) saturate(3)
hold_action:
action: toggle
style:
top: 86%
left: 30%
width: 12%
tap_action:
action: none
- type: state-label
entity: switch.d12_car_a_c_on
prefix: 空调
style:
top: 90%
left: 30%
font-size: 13px
color: rgb(90,90,90)
- type: image
entity: switch.car_windshield
title: 升窗
image: /local/car/home_icon_cardoor_active_nor.webp
filter: saturate(.7)
state_filter:
'on': brightness(150%) saturate(3)
hold_action:
action: toggle
style:
top: 86%
left: 90%
width: 12%
tap_action:
action: none
- type: state-label
entity: switch.car_windshield
prefix: 升窗
style:
top: 90%
left: 90%
font-size: 13px
color: rgb(90,90,90)
image: /local/car/bg_while.webp
|