DarkFox-homeassistant/packages/travel_time.yaml

68 lines
2.2 KiB
YAML

homeassistant:
customize:
sensor.s_train_b_status:
friendly_name: S-Tog Linje B Status
entity_picture: !secret s_tog_icon_url
sensor.s_train_b_next:
friendly_name: S-Tog Linje B Næste Afgang
entity_picture: !secret s_tog_icon_url
sensor.s_train_message:
friendly_name: S-Tog Driftbesked
icon: mdi:train
group:
travel_time:
name: Travel Time
entities:
- sensor.travel_time_to_work_driving
- sensor.travel_time_to_work_public_transit
- sensor.s_train_b_status
- sensor.s_train_message
- sensor.s_train_b_next
sensor:
- platform: google_travel_time
name: Martin to Home
api_key: !secret google_directions_secret
origin: device_tracker.google_maps_100030983205114312365
destination: zone.home
options:
mode: driving
- platform: google_travel_time
name: Travel time to work (Driving)
api_key: !secret google_directions_secret
origin: zone.home
destination: !secret work_address
options:
mode: driving
- platform: google_travel_time
name: Travel time to work (Public Transit)
api_key: !secret google_directions_secret
origin: zone.home
destination: !secret work_address
options:
mode: transit
- platform: scrape
resource: http://www.dsb.dk/trafikinformation/s-tog-overblik/
name: s_train_message
select: 'div.FooterFreeText'
value_template: "{{ value | trim }}"
scan_interval: 120
- platform: scrape
resource: http://www.dsb.dk/trafikinformation/s-tog-overblik/
name: s_train_b_status
select: 'table.RepeaterTable tr:nth-of-type(2) td.TDItemLabel div b'
value_template: "{{ value | trim }}"
scan_interval: 120
- platform: scrape
resource: "http://www.dsb.dk/Rejseplan/bin/stboard.exe/mn?L=vs_dsbticker&ml=m&&input=Br%F8ndby%F8ster%20st!&dirInput=N%F8rreport%20St.&boardType=dep&selectDate=today&productsFilter=00001000000&additionalTime=&start=yes&disableEquivs=yes&ignoreMasts=1&outputMode=tickerDataOnly&maxJourneys=5%27"
name: s_train_b_next
select: '.hfsWidget_resultTableRow_time div:nth-of-type(1)'
value_template: "{{ value | trim }}"
scan_interval: 30