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

 找回密码
 立即注册
查看: 2029|回复: 10

[UI界面] 既然汽车中控有了,那就做个模仿个界面吧

[复制链接]

37

主题

266

帖子

2135

积分

论坛DIY达人

积分
2135
金钱
1869
HASS币
20
发表于 2022-8-8 09:06:37 | 显示全部楼层 |阅读模式
本帖最后由 shadowba 于 2022-8-9 08:44 编辑

做做停停,汽车中控终于告一段落,看着奇丑无比的控制界面,全是开关和传感器,唉。。。。要不咱模仿一个???
更新esphome代码,汽车中控DIY,都说8266太累了,改用esp3... - 『HomeAssistant』综合讨论区 - 『瀚思彼岸』» 智能家居技术论坛 - Powered by Discuz! (hassbian.com)


晒一下我的改的新能源汽车控制界面 - 『HomeAssistant』综合讨论区 - 『瀚思彼岸』» 智能家居技术论坛 - Powered by Discuz! (hassbian.com)

微信图片_20220808090338.png

上锁/开锁、引擎启动/停止、充电/非充电等都可以直观看到,上图是在车辆上锁且充电中的截图
求助,如何读取新能源汽车的电量?

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







评分

参与人数 1金钱 +5 收起 理由
zero_33 + 5 厉害了word楼主!

查看全部评分

回复

使用道具 举报

5

主题

265

帖子

1899

积分

金牌会员

Rank: 6Rank: 6

积分
1899
金钱
1634
HASS币
0
发表于 2022-8-8 09:25:21 | 显示全部楼层
这个不错。哈哈。。
回复

使用道具 举报

19

主题

686

帖子

3440

积分

论坛元老

Rank: 8Rank: 8

积分
3440
金钱
2749
HASS币
20
发表于 2022-8-8 10:11:07 | 显示全部楼层
这个可以有
回复

使用道具 举报

23

主题

263

帖子

1561

积分

金牌会员

Rank: 6Rank: 6

积分
1561
金钱
1298
HASS币
0
发表于 2022-8-8 10:12:07 | 显示全部楼层
这个有意思了
回复

使用道具 举报

26

主题

2096

帖子

8508

积分

论坛元老

Rank: 8Rank: 8

积分
8508
金钱
6407
HASS币
30

论坛元老

发表于 2022-8-8 10:43:23 | 显示全部楼层
哇哦,越来越好了,什么都有了,大佬下一步是不是要给每个回帖的坛友再发个车了,哈哈哈
回复

使用道具 举报

37

主题

266

帖子

2135

积分

论坛DIY达人

积分
2135
金钱
1869
HASS币
20
 楼主| 发表于 2022-8-8 10:44:23 | 显示全部楼层
情非殇 发表于 2022-8-8 10:43
哇哦,越来越好了,什么都有了,大佬下一步是不是要给每个回帖的坛友再发个车了,哈哈哈 ...

我看行
回复

使用道具 举报

0

主题

50

帖子

827

积分

高级会员

Rank: 4

积分
827
金钱
777
HASS币
0
发表于 2022-8-8 10:54:37 | 显示全部楼层
大佬牛逼,啥都会啊,点赞收藏。
回复

使用道具 举报

7

主题

1072

帖子

3369

积分

论坛元老

Rank: 8Rank: 8

积分
3369
金钱
2297
HASS币
0
发表于 2022-8-8 11:26:44 | 显示全部楼层
这是大佬,厉害了word楼主
回复

使用道具 举报

44

主题

632

帖子

3560

积分

论坛元老

Rank: 8Rank: 8

积分
3560
金钱
2928
HASS币
0
发表于 2022-8-8 23:17:58 | 显示全部楼层
https://bbs.hassbian.com/thread-16467-1-1.html[/url]
我也来修下肌肉,haha ,给大家参考参考
回复

使用道具 举报

37

主题

266

帖子

2135

积分

论坛DIY达人

积分
2135
金钱
1869
HASS币
20
 楼主| 发表于 2022-8-9 07:14:08 来自手机 | 显示全部楼层
你这好啊,我的长城c30ev没有app,唉
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-26 12:26 , Processed in 0.747417 second(s), 36 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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