Skip to content

Commit

Permalink
Fix README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
th0r88 committed Dec 19, 2024
1 parent 90f5181 commit 27306d1
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,18 @@ After installation, you can add this card to your dashboard:
type: custom:auto-entities
filter:
include:
- entity_id: sensor.waste_collection_kranj
- entity_id: sensor.waste_collection_komunala_kranj
card:
type: custom:stack-in-card
cards:
- type: markdown
content: >
{% set collections = state_attr('sensor.waste_collection_kranj',
'collections') %}
{% set collections = state_attr('sensor.waste_collection_komunala_kranj', 'collections') %}
{% if collections %}
{% for collection in collections %}
{% set color = collection.color %}
{% set date = collection.date %}
{% set type = collection.description %}
<div style="
padding: 10px;
margin: 5px;
background-color: {{ color }};
border-radius: 5px;
color: {% if color == '#f9df2e' %}black{% else %}white{% endif %};
">
{{ date }} - {{ type }}
{% set color = collection.color | replace(" ", "") %}
<div style="padding: 10px; margin: 5px; background-color: {{color}}; border-radius: 5px; color: {% if color == '#f9df2e' %}black{% else %}white{% endif %};">
{{collection.date}} - {{collection.description}}
</div>
{% endfor %}
{% else %}
Expand Down

0 comments on commit 27306d1

Please sign in to comment.