Closed Ontrackx closed 2 years ago
Sorry i had not ticked the right fractions (probably diffrent ones to use where I live, thank you. Thumbs up for the integration
Doy you have a good automation/script/or UI/card to show the data? I am a new Homeassistant user (5years with openhab)
I'm using the following.
I have downloaded the icon images locally. The icon image can be found as the attribute Fraction icon
on the sensor. The folder /local/min_renovasjon
corresponds to the folder config/www/min_renovasjon
.
(The easiest way to access these folders and upload files is with the Add-on "File editor", if you're not already using it).
This view relies on the frontend component https://github.com/thomasloven/lovelace-template-entity-row.
entities:
- type: custom:template-entity-row
name: Matavfall
secondary: '{{ state_attr("sensor.matavfall", "formatted_date") }}'
state: >
{% set days = state_attr("sensor.matavfall", "days_to_pickup") %} {% if
days == 0 %}I dag {% elif days == 1 %}I morgen {% else %}Om {{ days }}
dager {% endif %}
image: >
{% set days = state_attr("sensor.matavfall", "days_to_pickup") %} {% if
days == 0 or days == 1 %}{{ "/local/min_renovasjon/3_highlighted.png" }}
{% else %}{{ state_attr("sensor.matavfall", "entity_picture") }} {% endif
%}
- type: custom:template-entity-row
name: Papir
secondary: '{{ state_attr("sensor.papir", "formatted_date") }}'
state: >
{% set days = state_attr("sensor.papir", "days_to_pickup") %} {% if days
== 0 %}I dag {% elif days == 1 %}I morgen {% else %}Om {{ days }} dager {%
endif %}
image: >
{% set days = state_attr("sensor.papir", "days_to_pickup") %} {% if days
== 0 or days == 1 %}{{ "/local/min_renovasjon/2_highlighted.png" }} {%
else %}{{ state_attr("sensor.papir", "entity_picture") }} {% endif %}
show_header_toggle: false
title: Neste henting av avfall
type: entities
Thank you for the answer, i do not understand "The icon image can be found as the attribute Fraction icon on the sensor." the icons where to download them?
Did you restart Home Assistant after you configured fractions? Any error messages in the log?