I’m trying to use a sensor as an input for an other sensor, but I can’t figure out exactly how to do it.
My code:
template:
- sensor:
- name: "Next train to Den Haag"
state: "{{state_attr('sensor.leiden_cs_den_haag_cs', 'next')}}"
sensor:
- platform: nederlandse_spoorwegen
api_key: 12345678
routes:
- name: Leiden CS-Den Haag CS
from: Ledn
to: Gvc
time: "{{ here I need sensor.next_time_to_den_haag but I don't know how }}"
Can anyone help me please?