Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved README.md based on new implemented features #18

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,26 @@ The Blitzer.de Home Assistant Custom Integration allows you to integrate the Bli

```
<h1><img src="https://www.blitzer.de/wp-content/uploads/logo-1.svg" height="23" > Achtung!</h1>
{% set blitzer = states['sensor.blitzerde_blitzerde_YOURCITY_total'].attributes -%}
{%- for stadt in blitzer -%}
{% if blitzer[stadt] is number -%}
{% if blitzer[stadt] > 1 -%}
<h2>{{blitzer[stadt]}} mobile Blitzer in <a href="https://map.blitzer.de/">{{stadt}}</a></h2>
{% else -%}
<h2>Ein mobiler Blitzer in <a href="https://map.blitzer.de/">{{stadt}}</a></h2>
{% endif -%}
{% endif -%}
{%- set anzahl_aktuelle_warnungen = states("sensor.blitzerde_blitzerde_YOURCITY_total") %}
{%- for i in range(int(anzahl_aktuelle_warnungen)) %}
{%- set blitzer_backend = state_attr("binary_sensor.blitzerde_blitzerde_YOURCITY_map"~ loop.index, "backend") %}
{%- set blitzer_vmax = state_attr("binary_sensor.blitzerde_blitzerde_YOURCITY_map"~ loop.index, "vmax") %}
{%- set blitzer_street = state_attr("binary_sensor.blitzerde_blitzerde_YOURCITY_map"~ loop.index, "street") %}
{%- set blitzer_city = state_attr("binary_sensor.blitzerde_blitzerde_YOURCITY_map"~ loop.index, "city") %}
{%- set blitzer_counter = state_attr("binary_sensor.blitzerde_blitzerde_YOURCITY_map"~ loop.index, "counter") %}
<h3>Blitzer {{blitzer_city}}</h3>
<font color ="grey">Bestätigt von {{blitzer_counter}} Personen</font>
<br/>
<a href="https://map.blitzer.de/v5/ID/{{blitzer_backend}}/">{{blitzer_street}}</a> bei {{blitzer_vmax}} km/h
<br/>
{%- if not loop.last %}<hr>{%- endif %}
{%- endfor %}
```

### Screenshot

![image](https://github.com/user-attachments/assets/0b1b3b3a-4196-4c88-a1c2-3fd261d0dc5b)
![image](https://github.com/user-attachments/assets/8d61f1b9-12b0-411d-ba3f-02d9369d7dff)


## Installation

Expand Down