Comments (6)
Temporarily I replaced this card with HA's built-in markdown card showing this template, to still have the information displayed:
{% if is_state_attr('sensor.fkf_hulladek', 'garbage0', 'communal') -%}
<ha-icon icon="mdi:trash-can-outline"></ha-icon> {{ state_attr('sensor.fkf_hulladek', 'date0') }} - Kommunális
{%- elif is_state_attr('sensor.fkf_hulladek', 'garbage0', 'selective') -%}
<ha-icon icon="mdi:leaf"></ha-icon> {{ state_attr('sensor.fkf_hulladek', 'date0') }} - Szelektív
{%- endif %} - {{ (( as_timestamp(strptime(state_attr('sensor.fkf_hulladek', 'date0'), '%Y.%m.%d')) - as_timestamp(now())) / 86400 ) | round(0) }} nap
{% if is_state_attr('sensor.fkf_hulladek', 'garbage1', 'communal') -%}
<ha-icon icon="mdi:trash-can-outline"></ha-icon> {{ state_attr('sensor.fkf_hulladek', 'date1') }} - Kommunális
{%- elif is_state_attr('sensor.fkf_hulladek', 'garbage1', 'selective') -%}
<ha-icon icon="mdi:leaf"></ha-icon> {{ state_attr('sensor.fkf_hulladek', 'date1') }} - Szelektív
{%- endif %} - {{ (( as_timestamp(strptime(state_attr('sensor.fkf_hulladek', 'date1'), '%Y.%m.%d')) - as_timestamp(now())) / 86400 ) | round(0) }} nap
{% if is_state_attr('sensor.fkf_hulladek', 'garbage2', 'communal') -%}
<ha-icon icon="mdi:trash-can-outline"></ha-icon> {{ state_attr('sensor.fkf_hulladek', 'date2') }} - Kommunális
{%- elif is_state_attr('sensor.fkf_hulladek', 'garbage2', 'selective') -%}
<ha-icon icon="mdi:leaf"></ha-icon> {{ state_attr('sensor.fkf_hulladek', 'date2') }} - Szelektív
{%- endif %} - {{ (( as_timestamp(strptime(state_attr('sensor.fkf_hulladek', 'date2'), '%Y.%m.%d')) - as_timestamp(now())) / 86400 ) | round(0) }} nap
from fkf-garbage-collection-card.
Strange as the card doesn't cause high load on Android/Chrome. Could you please try to load Lovelace on Android/Chrome? If that does not cause high load then there is something with the WallPaper app.
from fkf-garbage-collection-card.
It causes high load on any browser on these devices.
WallPanel just uses Android's builtin System WebView, which is based on Chrome. Currently v81.0.4044.111.
from fkf-garbage-collection-card.
Another way to work around is creating a standard template sensor based on the fkf component:
- platform: template
sensors:
fkf_day0:
unit_of_measurement: nap
availability_template: "{{ is_state_attr('sensor.fkf_hulladek', 'current', 'current') }}"
friendly_name_template: >-
{% if is_state_attr('sensor.fkf_hulladek', 'garbage0', 'communal') -%}
Kommunális
{%- elif is_state_attr('sensor.fkf_hulladek', 'garbage0', 'selective') -%}
Szelektív
{%- endif %}
value_template: >-
{{ (( as_timestamp(strptime(state_attr('sensor.fkf_hulladek', 'date0'), '%Y.%m.%d')) - as_timestamp(now())) / 86400 -1) | round(0) }}
icon_template: >-
{% if is_state_attr('sensor.fkf_hulladek', 'garbage0', 'communal') -%}
mdi:trash-can-outline
{%- elif is_state_attr('sensor.fkf_hulladek', 'garbage0', 'selective') -%}
mdi:leaf
{%- endif %}
fkf_day1:
unit_of_measurement: nap
availability_template: "{{ is_state_attr('sensor.fkf_hulladek', 'current', 'current') }}"
friendly_name_template: >-
{% if is_state_attr('sensor.fkf_hulladek', 'garbage1', 'communal') -%}
Kommunális
{%- elif is_state_attr('sensor.fkf_hulladek', 'garbage1', 'selective') -%}
Szelektív
{%- endif %}
value_template: >-
{{ (( as_timestamp(strptime(state_attr('sensor.fkf_hulladek', 'date1'), '%Y.%m.%d')) - as_timestamp(now())) / 86400 -1) | round(0) }}
icon_template: >-
{% if is_state_attr('sensor.fkf_hulladek', 'garbage1', 'communal') -%}
mdi:trash-can-outline
{%- elif is_state_attr('sensor.fkf_hulladek', 'garbage1', 'selective') -%}
mdi:leaf
{%- endif %}
from fkf-garbage-collection-card.
Newest release (0.6.4) added performance improvements.
Please update the card, reload the page and let me know the results.
from fkf-garbage-collection-card.
Any update on performance improvements on the new version? Should this issue be closed?
from fkf-garbage-collection-card.
Related Issues (8)
- Icon color HOT 6
- "days" localization HOT 2
- Items arrangement HOT 8
- Layout revamp ideas HOT 1
- Doesn't work outside HACS HOT 2
- Extension for Budaörs HOT 1
- Error in the green waste query in Budaörs HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fkf-garbage-collection-card.