之前一直用https://bbs.hassbian.com/thread-4679-1-1.html
HA从2021.4.3升级到2021.8.1的时候挂了,加了版本号也不好使
插件不会修,NR会一点点,看了下百度API决定自己撸一个
流很简单,需要输入的有起始地址经纬度、目的地经纬度,AK(参考原帖申请即可)
提一句riding_type=0是自行车,1是电动车,开车不生效
自动创建实体(HA要重启,坑点)
flows.zip
(1.92 KB, 下载次数: 100)
one more thing:使用custom:multiple-entity-row,可以点击右边导航直接跳转百度app
type: entities
show_header_toggle: false
entities:
- type: custom:multiple-entity-row
entity: sensor.home2office_drive
icon: mdi:domain
name: 去公司
show_state: false
entities:
- entity: sensor.home2office_ride
name: 骑车
- entity: sensor.home2office_drive
name: 开车
- icon: mdi:navigation-outline
name: 导航
tap_action:
action: url
url_path: >-
baidumap://map/direction?origin=我的位置&destination=XXXXXXX&mode=driving®ion=所在市&src=ios.xxxx随便写.openAPIdemo
- type: custom:multiple-entity-row
entity: sensor.home2office_drive
icon: mdi:home-account
name: 回家
show_state: false
entities:
- entity: sensor.office2home_ride
name: 骑车
- entity: sensor.office2home_drive
name: 开车
- icon: mdi:navigation-outline
name: 导航
tap_action:
action: url
url_path: >-
baidumap://map/direction?origin=我的位置&destination=XXXXXX&mode=driving®ion=所在市&src=ios.xxxx随便写.openAPIdemo
|