New History in 2022.7 - Multiple dynamic History URLs by groups

I see…How about something like this then?

type: custom:config-template-card
variables:
  link_url: >
    group => { return "/history?entity_id=" + 
    states[group].attributes.entity_id.toString().replace(/,/g,"%2c"); }
entities:
  - group.outdoor_devices
  - group.upstairs_bathroom_lights
card:
  type: entities
  entities:
    - type: weblink
      name: Outdoor Devices History
      url: ${ link_url("group.outdoor_devices") }

    - type: weblink
      name: Upstairs Bathroom Lights History
      url: ${ link_url("group.upstairs_bathroom_lights") }

    - entity: sensor.memory_use_percent
      hold_action:
        action: navigate
        navigation_path: ${ link_url("group.upstairs_bathroom_lights") }

(Note: for this example, I’m using real entities from my HA instance, and I only have a couple groups defined at the moment, but hopefully it should give you an idea if this approach would work for you or not)

1 Like