r-renato / ha-card-waze-travel-time Goto Github PK
View Code? Open in Web Editor NEWHome Assistant Lovelace card for Waze Travel Time Sensor
License: MIT License
Home Assistant Lovelace card for Waze Travel Time Sensor
License: MIT License
running HA 0.109.6
on a Pi4
I'm getting the message below in my HA log after a restart of HA.
Log Details (WARNING)
Logger: homeassistant.components.waze_travel_time.sensor
Source: components/waze_travel_time/sensor.py:120
Integration: waze_travel_time (documentation, issues)
First occurred: 8:51:15 PM (1 occurrences)
Last logged: 8:51:15 PM
sensor:
- platform: waze_travel_time
origin: !secret waze_origin
destination: !secret waze_destination
name: home2work
region: 'EU'
realtime: true
vehicle_type: car
avoid_ferries: true
avoid_toll_roads: true
avoid_subscription_roads: true
# TO HOME FROM WORK
- platform: waze_travel_time
origin: !secret waze_destination
destination: !secret waze_origin
name: work2home
region: 'EU'
realtime: true
vehicle_type: car
avoid_ferries: true
avoid_toll_roads: true
avoid_subscription_roads: true
Header showing column label is not showing up
I've tried header: true and just deleting the line as default setting should be true.
Checked both on my computer on Firefox and on my iPhone.
I am on HA 2021.7.4
type: custom:ha-card-waze-travel-time
name: Mike to...
header: true
unit: mi
columns:
- to
- duration
- distance
- route
destinations:
- entity: sensor.mike_to_home_waze
from: Mike
to: Home
- entity: sensor.mike_to_home_waze_toll
to: Home (Toll)
- entity: sensor.mike_to_work_waze
to: Work
Hi,
I have setup your travel time template as below but the distance is not miles, they appear to be in KM even thou I have the units set to mi.
is there an option somewhere else I need to change?
name: Daves Travel time
unit: mi
columns:
- from
- to
- duration
- distance
- icon
destinations:
- entity: sensor.waze_travel_time_2
origin: device_tracker.14_pro
to: Travel to Home
- entity: sensor.waze_travel_time
origin: device_tracker.14_pro
to: Travel to work
- entity: sensor.to_mums
origin: device_tracker.14_pro
to: To Mums
- entity: sensor.to_stephs
origin: device_tracker.14_pro
to: To Stephs
My Lovalace config to this card:
card:
header: true
columns:
- from
- to
- duration
- distance
- route
destinations:
- entity: sensor.para_metro_cjsp
name: "Metro Jardim São Paulo"
- entity: sensor.para_casa_vitao
name: "Casa Vitão"
name: Waze
type: 'custom:ha-card-waze-travel-time'
style:
background-color: 'rgba(50,50,50,0.3)'
background-repeat: no-repeat
background-size: 100% 300px
border: 'solid 1px rgba(100,100,100,0.3)'
border-radius: 20px
box-shadow: '3px 3px rgba(0,0,0,0.4)'
type: 'custom:card-modder'
Hi,
I just installed your card, and when I click a route to open it in Waze maps (Firefox 77, Win10) the website crashes. It looks like it tries to refresh the page a gazillion times. I cannot find any logs which are related, i hope you can reproduce it. I see the &time=now flickering in the URL bar when the page tries to load, this might be related.
My card config:
columns:
- from
- to
- duration
- distance
destinations:
- entity: sensor.home_to_work
from: Home
to: Work
name: Travel Time
type: 'custom:ha-card-waze-travel-time'
unit: km
My sensor:
- platform: waze_travel_time
name: Home to Work
origin: zone.home
destination: zone.work
region: 'EU'
Cheers!
I am using HassOS v3.12 and HA v0.107.5 although issue happened on 0.106 and the HACS HA (Lovelace) Card Waze Travel Time version is 16af755
The issue is that my Lovelace card shows a white box with no routes
My Waze sensor config is as follows:
sensor:
- platform: waze_travel_time
name: "To Work"
origin: Zone.home
destination: zone.paul_work
realtime: true
region: 'EU'
- platform: waze_travel_time
name: "To Home"
origin: Zone.paul.work
destination: zone.home
realtime: true
region: 'EU'
My Lovelace card config is
type: 'custom:ha-card-waze-travel-time'
header: false
name: Route to...
unit: mi
columns:
- from
- to
- duration
- distance
- icon
destinations:
- entity: sensor.to_work
from: Home
to: Work
- entity: sensor.to_home
to: Home
style: |
ha-card: {
background-repeat: no-repeat
background-color: 'rgba(50,50,50,0.3)'
background-size: 100% 300px
border-radius: 20px
border: 'solid 1px rgba(100,100,100,0.3)'
box-shadow: '3px 3px rgba(0,0,0,0.4)'
}
I originally tried to use custom: card-modder, but switched to HACS integration cad-mod after I got an invalid config warning and it was suggested to use this.
Any idea what I am doing wrong?
Thanks
Paul
Hello, the travel time I'm displaying is 367 minutes, just not a very usable way to think about time. Is there any way to get a display of hours and minutes formatted as "HH:MM"? Thank you.
Hi, could I ask if support for a different icon could be added based on the entity?
Right now, the destination
object supports only from
and to
values, aside fro, the entity of course.
Thank you!
Looks like we need a way to specify that the distance is measured in miles and not kilometres.
I have a destination that is variable based on my calendar, I can't seem to update the destination with that value. Some of the templates I have tried:
'{{state_attr('calender.activities', 'location') | string}}'
'{{state_attr('calender.activities', 'location')'
I am guessing the input doesn't support templates?
type: custom:ha-card-waze-travel-time
header: false
name: Current Drive Time...
unit: mi
columns:
- from
- to
- duration
- distance
- icon
destinations:
- entity: sensor.waze_travel_time
from: Home
to: '{{state_attr('calender.activities', 'location') | string}}'
style: |
ha-card {
--primary-text-color: #FFFFFF;
--secondary-text-color: [#727272](https://github.com/r-renato/ha-card-waze-travel-time/issues/727272);
--text-primary-color: #ffffff;
--disabled-text-color: #bdbdbd;
background-image: url("/local/imgs/card_back.png") ;
background-repeat: no-repeat ;
background-color: rgba(50,50,50,0.3) ;
background-size: 100% 300px ;
border-radius: 20px ;
border: solid 1px rgba(100,100,100,0.3) ;
box-shadow: 3px 3px rgba(0,0,0,0.4) ;
}
I think I maybe confused on the terminology. Also I'm not even sure I'm posting this in the right place. But waze automatically picks the fastest route to my destination and it displays the fastest time for said route. My problem is I don't know which route it is choosing and I don't know how to force it to pick a particular route. I saw something on the site about an input for a substring * to force a route but I'm not sure how that's done. I don't see it here. Am I missing something? Any help would be appreciated.
Card-modder is listed as deprecated in favor of card-mod.
Hence, I tried with card-mod but I get the following:
r.setConfig is not a function. (In ‘r.setConfig(Object(i.a)(t))’,’r.setConfig’ is undefined
Assuming that this is because of card-mod, could you consider moving over to that since card-modder is deprecated?
Hi,
I followed instruction in wiki but it don't works...
first I need to have waze travel time integration installed and configured on HA?
When using the style-example as provided and insert a background image it looks like that the image is drawen after the text and overwrites the information.
maybe this can be corrected.
Is there an option to change the icons?
Greetings
Kilowatt
V 038f2a8 HA 0.110.0 Firefox 76.0.1 (64-bit) - Card is being blocked by Firefox with error message:
Blocked by X-Frame-Options Policy
An error occurred during a connection to embed.waze.com.
Firefox prevented this page from loading in this context because the page has an X-Frame-Options policy that disallows it.
Work around: use FF add on: https://addons.mozilla.org/en-US/firefox/addon/ignore-x-frame-options-header
Hi all,
I have an issue with this card. I have the name in the header but ta=hat's all. All the card is blank.
However, if i click on the card, i am redirected to Waze page with correct GPS coordinates, which mean that the datas are OK.
Here is how i configured the card:
- type: custom:ha-card-waze-travel-time
name: "Trajet vers..."
unit: km
columns:
- from
- to
- duration
- distance
- icon
destinations:
- entity: sensor.waze_travel_time
from: "Domicile"
to: "Travail"
Screenshot:
And if i use standrd card, it's OK
Any suggestions ?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.