Closed ildar170975 closed 1 month ago
Came here looking for this! that would be amazing ! thank you 😄
Dear Nathan,
Any updates on this? Map is fantastic, very good detailed alternative to default one.
Definitely doable, only need to find the time.
The asthetic of the map displayed in your card is like night and day as compared to the stock HA map display. But I would also love to see the hours_to_show functionality. Just wish I had the skill set to contribute.
I would also kindly ask for adding the path/hours to show option. And a donate button. :)
Love this map. Hope to see this feature soon.
I've been looking at it this evening, and also trying to understand how HA does it. It's not a 100% straightforward to get the history. Unfortunately I cannot directly extend the frontend (that would be great).
The main code in HA is in this file: https://github.com/home-assistant/frontend/blob/master/src/panels/lovelace/cards/hui-map-card.ts
Looks like the only way to get the history, is using the callWs function, similar to: https://github.com/home-assistant/frontend/blob/master/src/data/history.ts#L102
From a config point of view I'm thinking of using a more flexible approach then hours_to_show
. I was thinking per entity to have an option like: startTime
and endTime
which would accept a full datetime, but also a relative statement like 2 hours ago
& now
.
WDYT?
That sounds awesome 👍 thanks for taking the time to implement this 😉
I started development and figured out to retrieve the history from HA, next up plotting this on a map. Getting closer!
In v0.7.0 a basic version of the history is implemented, see the readme on how to use. It does have some missing functionality (eg. line opacity) compared to the stock HA Map.
In v0.7.0 a basic version of the history is implemented, see the readme on how to use. It does have some missing functionality (eg. line opacity) compared to the stock HA Map.
That's Fantastic! Did try! Thanks a lot!
PS If there is a chance to get auto switch to dark mode theme, as in standard Map?
@nathan-gs Thanks a lot for the feature. Noticed that sometimes a track is not shown; may be shown after F5.
Also, in Docs it it specified:
and imho these
__2022-03-01T12:00:00Z__
& __now__
are not clear.
I used these - and this seems to work:
history_start: 7 hours ago
history_end: now
May be this point should be better explained in Docs - at least w/o these "underscores".
Also it is possible to define
history_end: 2 hours ago
and I would suggest to reflect this in Docs too.
Also, noticed that history_line_color
can defined as red
, rgb(255,0,0)
, rgba(255,0,0,0.1)
, #ff0000
, var(--green-color)
- this is SUPER cool and should be mentioned on Docs.
Thank you very much for this ! Now I can get rid of a duplicate stock maps that existed only because of the history feature. Any chance to get an option to turn off the history point "dots" and keep only the line in between? When moving in a small area, the dots fill the area rather rapidly.
@alexreddy78
If there is a chance to get auto switch to dark mode theme, as in standard Map?
Suggest not to mix different features & register a separate FR.
@Hiekkaharju
Any chance to get an option to turn off the history point "dots" and keep only the line in between?
Suggest to register a separate FR.
A stock map card allows to show a path if
hours_to_show
option is defined:Also, it possible to see a time of a particular point in a tooltip:
Would be great to have these features in this custom card. Otherwise this card may only be used to see a current position only.