nathan-gs / ha-map-card

A Map Card for Home Assistant
https://community.home-assistant.io/t/map-card-a-slightly-improved-map-card/693088
MIT License
15 stars 4 forks source link

Provide the ability to explore location history data using HA date range. #41

Closed thybag closed 1 month ago

thybag commented 1 month ago

Hi @nathan-gs,

Slightly chunkier one, but is the idea that set me off looking for a custom map card to begin with.

By setting history_date_selection to true, the card will attempt to link with a type: energy-date-selection on the same page (in the same way sankey charts and other energy dashboard components do) to provide users with an easy way to navigate through the historical location data - both looking a time ranges and specific dates.

image

Although its a bit odd the component is energy-date-selection, HA don't have a more generic version and this one provides pretty much my full feature Wishlist out of the box in terms of exploring history.

As a rundown of key changes:

Please let me know if you have any thoughts/suggestions on how this all works 😄

Cheers, Carl

nathan-gs commented 1 month ago

This is a very cool feature!

As an extension, some WMS & TileLayers also support history would be nice to be able to pass this (but that could be another PR).

thybag commented 1 month ago

I think connecting the WMS/Tilelayers up to the date change events would be reasonably straight forwards. As you said, suspect it may be better placed in its own PR, but if you have any recommendations on public WMS/TileLayers with history support i could have a play with, I'd be up for having a go. I assume potentially it'd just be passing a time option via WMSTileOptions or similar.

nathan-gs commented 1 month ago

Let's do this in a seperate PR!

For WMS layers, it's often just a parameter (almost always called time or timestamp) formatted as a YYYY-MM-DDTHH:MM:SSZ:

Take a look at the GetCapabilities of the IRCELINE WMS maps: https://geo.irceline.be/rio/wms?service=wms&version=1.3.0&request=GetCapabilities you see there's a Dimensiion named time.