Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-dH committed May 6, 2019
2 parents 072df73 + a05da65 commit 3edac29
Show file tree
Hide file tree
Showing 2 changed files with 177 additions and 20 deletions.
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,65 +97,65 @@ cards:
- card:
columns: 5
entities:
- entity: sensor.tram_23
- entity: sensor.tram_23_templated
icon: 'mdi:tram'
- entity: sensor.tram_23_future_1
- entity: sensor.tram_23_future_1_templated
icon: 'mdi:x'
- entity: sensor.tram_23_future_2
- entity: sensor.tram_23_future_2_templated
icon: 'mdi:x'
- entity: sensor.tram_23_future_3
- entity: sensor.tram_23_future_3_templated
icon: 'mdi:x'
- entity: sensor.tram_23_future_4
- entity: sensor.tram_23_future_4_templated
icon: 'mdi:x'
show_header_toggle: false
show_name: false
title: Tram 23
type: glance
cards: null
style:
background-image: url(/local/tram.png?v=0.5)
background-image: url(/local/images/tram.png?v=0.6)
type: 'custom:card-modder'
- card:
columns: 5
entities:
- entity: sensor.bus_140
- entity: sensor.bus_140_templated
icon: 'mdi:bus'
- entity: sensor.bus_140_future_1
- entity: sensor.bus_140_future_1_templated
icon: 'mdi:x'
- entity: sensor.bus_140_future_2
- entity: sensor.bus_140_future_2_templated
icon: 'mdi:x'
- entity: sensor.bus_140_future_3
- entity: sensor.bus_140_future_3_templated
icon: 'mdi:x'
- entity: sensor.bus_140_future_4
- entity: sensor.bus_140_future_4_templated
icon: 'mdi:x'
show_header_toggle: false
show_name: false
title: Bus 140
type: glance
cards: null
style:
background-image: url(/local/bus1.png?v=0.2)
background-image: url(/local/images/bus1.png?v=0.3)
type: 'custom:card-modder'
- card:
columns: 5
entities:
- entity: sensor.bus_183
- entity: sensor.bus_183_templated
icon: 'mdi:bus'
- entity: sensor.bus_183_future_1
- entity: sensor.bus_183_future_1_templated
icon: 'mdi:x'
- entity: sensor.bus_183_future_2
- entity: sensor.bus_183_future_2_templated
icon: 'mdi:x'
- entity: sensor.bus_183_future_3
- entity: sensor.bus_183_future_3_templated
icon: 'mdi:x'
- entity: sensor.bus_183_future_4
- entity: sensor.bus_183_future_4_templated
icon: 'mdi:x'
show_header_toggle: false
show_name: false
title: Bus 183
title: Bus 83 / 183
type: glance
cards: null
style:
background-image: url(/local/bus2.png?v=0.3)
background-image: url(/local/images/bus2.png?v=0.1)
type: 'custom:card-modder'
type: vertical-stack
```
Expand All @@ -166,7 +166,7 @@ type: vertical-stack
- [Robban](https://github.com/Kane610) - A lot of basic help with the Python code.
- [Danito](https://github.com/danito/HA-Config/blob/master/custom_components/sensor/stib.py) - I started with his script, learned a lot of it)
- [pippyn](https://github.com/pippyn) - Huge contributions and a lot of bugfixes, thanks mate!
- rolfberkenbosch - For a start of the timing_point_code documentation.
- [rolfberkenbosch](https://github.com/rolfberkenbosch/) - For a start of the timing_point_code documentation.
- [IIIdefconIII](https://github.com/IIIdefconIII/) - Some minor contributions to add the custom updater and updating the readme.
### Custom updater:
Expand Down
157 changes: 157 additions & 0 deletions oviapi_templated.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
############################################
## Public Transport ##
############################################
###### SENSORS -----------------------------
###### TRAM 23 -----------------------------
sensor:
- platform: template
sensors:
tram_23_templated:
friendly_name: tram_23_templated
value_template: >-
{% if is_state('sensor.tram_23', 'unknown') %}
{% else %}
{{ states('sensor.tram_23') }}
{% endif %}
- platform: template
sensors:
tram_23_future_1_templated:
friendly_name: tram_23_future_1_templated
value_template: >-
{% if is_state('sensor.tram_23_future_1', 'unknown') %}
{% else %}
{{ states('sensor.tram_23_future_1') }}
{% endif %}
- platform: template
sensors:
tram_23_future_2_templated:
friendly_name: tram_23_future_2_templated
value_template: >-
{% if is_state('sensor.tram_23_future_2', 'unknown') %}
{% else %}
{{ states('sensor.tram_23_future_2') }}
{% endif %}
- platform: template
sensors:
tram_23_future_3_templated:
friendly_name: tram_23_future_3_templated
value_template: >-
{% if is_state('sensor.tram_23_future_3', 'unknown') %}
{% else %}
{{ states('sensor.tram_23_future_3') }}
{% endif %}
- platform: template
sensors:
tram_23_future_4_templated:
friendly_name: tram_23_future_4_templated
value_template: >-
{% if is_state('sensor.tram_23_future_4', 'unknown') %}
{% else %}
{{ states('sensor.tram_23_future_4') }}
{% endif %}
###### BUS 140 -----------------------------
- platform: template
sensors:
bus_140_templated:
friendly_name: bus_140_templated
value_template: >-
{% if is_state('sensor.bus_140', 'unknown') %}
{% else %}
{{ states('sensor.bus_140') }}
{% endif %}
- platform: template
sensors:
bus_140_future_1_templated:
friendly_name: bus_140_future_1_templated
value_template: >-
{% if is_state('sensor.bus_140_future_1', 'unknown') %}
{% else %}
{{ states('sensor.bus_140_future_1') }}
{% endif %}
- platform: template
sensors:
bus_140_future_2_templated:
friendly_name: bus_140_future_2_templated
value_template: >-
{% if is_state('sensor.bus_140_future_2', 'unknown') %}
{% else %}
{{ states('sensor.bus_140_future_2') }}
{% endif %}
- platform: template
sensors:
bus_140_future_3_templated:
friendly_name: bus_140_future_3_templated
value_template: >-
{% if is_state('sensor.bus_140_future_3', 'unknown') %}
{% else %}
{{ states('sensor.bus_140_future_3') }}
{% endif %}
- platform: template
sensors:
bus_140_future_4_templated:
friendly_name: bus_140_future_4_templated
value_template: >-
{% if is_state('sensor.bus_140_future_4', 'unknown') %}
{% else %}
{{ states('sensor.bus_140_future_4') }}
{% endif %}
###### BUS 183 -----------------------------
- platform: template
sensors:
bus_183_templated:
friendly_name: bus_183_templated
value_template: >-
{% if is_state('sensor.bus_183', 'unknown') %}
{% else %}
{{ states('sensor.bus_183') }}
{% endif %}
- platform: template
sensors:
bus_183_future_1_templated:
friendly_name: bus_183_future_1_templated
value_template: >-
{% if is_state('sensor.bus_183_future_1', 'unknown') %}
{% else %}
{{ states('sensor.bus_183_future_1') }}
{% endif %}
- platform: template
sensors:
bus_183_future_2_templated:
friendly_name: bus_183_future_2_templated
value_template: >-
{% if is_state('sensor.bus_183_future_2', 'unknown') %}
{% else %}
{{ states('sensor.bus_183_future_2') }}
{% endif %}
- platform: template
sensors:
bus_183_future_3_templated:
friendly_name: bus_183_future_3_templated
value_template: >-
{% if is_state('sensor.bus_183_future_3', 'unknown') %}
{% else %}
{{ states('sensor.bus_183_future_3') }}
{% endif %}
- platform: template
sensors:
bus_183_future_4_templated:
friendly_name: bus_183_future_4_templated
value_template: >-
{% if is_state('sensor.bus_183_future_4', 'unknown') %}
{% else %}
{{ states('sensor.bus_183_future_4') }}
{% endif %}

0 comments on commit 3edac29

Please sign in to comment.