BeardedTinker / Home-Assistant_Config

BeardedTinker Home Assistant configuration. Feel free to browse, edit, tweak, improve, criticize and suggest.
MIT License
444 stars 50 forks source link

GTFS examples #113

Open BeardedTinker opened 8 months ago

BeardedTinker commented 8 months ago

As I didn't cover everything in video, here are few other things I'm using.

For example, for individual tracking, I've created for each family member it's "in vicinity" sensor:

image

It will than create a bunch (if exist) stops for all transport types.

These can be used as map overlays:

image

Code for card looks as follows:

type: custom:auto-entities
card:
  type: map
  hours_to_show: 2
  dark_mode: true
  default_zoom: 17
  auto_fit: true
filter:
  include:
    - entity_id: '*_local_stop_person_andrej*'
    - entity_id: person.andrej
show_empty: true

Also, you can create flex table with data for everyone or just on person:

image
type: custom:auto-entities
filter:
  include:
    - name: '*local_stop*'
  exclude:
    - state: unavailable
card:
  type: custom:flex-table-card
  clickable: true
  max_rows: 30
  title:  ZET departures
  sort_by:
    - next_departures_lines
  columns:
    - hidden: true
      data: next_departures_lines
      modify: x.departure
    - name: Route
      data: next_departures_lines
      modify: '''<ha-icon icon='' + x.icon + ''></ha-icon>'' + x.route'
    - name: Time
      data: next_departures_lines
      modify: x.departure
    - name: Stop
      data: next_departures_lines
      modify: x.stop_name
    - name: Headsign
      data: next_departures_lines
      modify: x.headsign
  css:
    table+: 'padding: 0px'
  card_mod:
    style: |
      ha-card {
        overflow: auto;
        max-height: 500px;
      }
lindsay245jpe commented 8 months ago

Thanks so much for this. I was editing the 'local_stop' to the sensor name and that was what was wrong. My bad.