I use a flex-table-card to display the departure times for buses (as below) but I would like to change and instead show how many minutes it is to departure (“Leaves in”).
I tried but cannot really figure out how to do it…my assumption is that I would be able to do something like this below…
type: custom:flex-table-card
sort_by: state+
title: To Radiomotet & Frölunda torg
columns:
- name: From
attr: friendly_name
modify: x.split(' mot')[0]
- name: Bus
attr: line
- name: Direction
attr: direction
modify: x.split(',')[0]
- name: Depart
prop: state
- name: Leaves in
data: state
modify:
<<< SOMETHING HERE TO MODIFY THE DISPLAYED VALUE, WHICH IS THE "STATE VALUE" OF THE SENSOR >>>
entities:
include:
- sensor.eklanda_torg_mot_f*
- sensor.eklanda_skola_mot_f*
Anyone that could guide me?