Comments (8)
Hi,
1 line needs to be replaced in configuration.yaml
original:
{{ state_attr('sensor.washer', 'remain_time') }}
replace it with this:
{{ as_timestamp(strptime(state_attr('sensor.washer', 'remain_time'), '%H:%M:%S')) | timestamp_custom('%-H:%M') }}
from lg-washer-dryer-card.
Hi, 1 line needs to be replaced in configuration.yaml
original:
{{ state_attr('sensor.washer', 'remain_time') }}
replace it with this:
{{ as_timestamp(strptime(state_attr('sensor.washer', 'remain_time'), '%H:%M:%S')) | timestamp_custom('%-H:%M') }}
Thank you so much, it works like magic!
from lg-washer-dryer-card.
Hi, i have same problem with time :-(
My card show time with seconds... I've tried change configuration.yaml but time is still with seconds... Can you help me?
from lg-washer-dryer-card.
Hi, attached is my working code, hope it will work for you too,
#LG Washer
- platform: template
sensors:
washer_door_lock:
friendly_name: "Washer Door Lock"
value_template: "{{ state_attr('sensor.washer','washer_door_lock') }}"
washer_time_display:
friendly_name: "Washer Time Display"
value_template: >
{% if is_state('sensor.washer_run_state', '-') %}
{% elif is_state('sensor.washer_run_state', 'Standby') %}
--:--
{% else %}
{{ as_timestamp(strptime(state_attr('sensor.washer', 'remain_time'), '%H:%M:%S')) | timestamp_custom('%-H:%M') }}
{% endif %}
dryer_time_display:
friendly_name: "Dryer Time Display"
value_template: >
{% if is_state('sensor.washer_run_state', '-') %}
{% elif is_state('sensor.washer_run_state', 'Standby') %}
-:--
{% else %}
{{ as_timestamp(strptime(state_attr('sensor.washer', 'remain_time'), '%H:%M:%S')) | timestamp_custom('%-H:%M') }}
{% endif %}
blank:
friendly_name: "Blank Sensor"
value_template: ""
from lg-washer-dryer-card.
Still not working :-( I love this LG card, but time covers another icons...
configuration.zip
This is my configuration.yaml -
Now HA show error in log...
from lg-washer-dryer-card.
This is my config with modified time display without seconds... but still not working
configuration.zip
But wit hthis config i dont have any error in log.
from lg-washer-dryer-card.
Hi - is there anyway to use "-:--:--" as the time remaining after the system is off? I would appreciate it this could be possible instead of just leaving it with 0 time remaining.
Awesome integration btw - absolutely love it!
from lg-washer-dryer-card.
@raymondsfk I'm glad you got it working in the end. I apologize for my delay, I've been quite busy and behind on my inbox.
@petrklic16 The reason your configuration does not work is because, according to the configuration.zip in this comment, you tried to access the remaining_time
attribute of your sensor.pracka
. There is no remaining_time
attribute, only remain_time
. But the error message in the screenshot shows that you tried to access the remain_time
attribute of sensor.washer
, and of course you don't have a sensor.washer
, so you needed to rename it to sensor.pracka
. I'm guessing the error message is from before you restarted Home Assistant, so it was running an old configuration.
My best advice to you is to take the template code {{ like this }}
and go to /developer-tools/template
in your Home Assistant (if you don't have this, click on your name in the bottom left and turn on Advanced Mode). Tweak it until it works. Then put it in your configuration.yaml and make sure to Restart Home Assistant.
The short answer: make sure you are accessing the remain_time
attribute of sensor.pracka
, in your case, or else it won't work.
@FS1961: the reason your card is showing zeroes instead of going blank is because your machine is showing a different value than my machine when it's done. The code in this project's configuration that you need to change is {% if is_state('sensor.washer_run_state', '-') %}
. This is because when my washer/dryer are done, they show a dash in the run_state
entity. You need to check what your device shows when it's not running, and test for that value in these if statements throughout the configuration. Because I don't know what your particular device shows, I won't be able to tell you what to put in there.
from lg-washer-dryer-card.
Related Issues (20)
- Instruction Improvement HOT 1
- Seconds are displayed now HOT 7
- Feature request: Child lock icons/status HOT 2
- Sensor Missing HOT 3
- Multiple images not showing u p HOT 2
- Wash status is not displayed HOT 10
- Card Backgrounds for WM4000HWA and DLEX4000W HOT 2
- README.md image links are b0rked HOT 1
- Everything works except the font HOT 1
- How do I remove this error logo from the cards? I don't have any errors with the integration so not sure why they're there. HOT 3
- Format time from 0:00:00 to -:–:– for washer when complete and system is off HOT 1
- Card showing invalid status? HOT 10
- Still can't get remaining time to be -:-- when state is Off/Standby/- HOT 5
- remain_time or reserve_time? HOT 1
- Add icon in French HOT 10
- Power usage information HOT 1
- [BUG] 7segment font not used in iOS HOT 2
- Pictures disappeared in Lovelace HOT 2
- [BUG] Repository structure for main is not compliant HOT 1
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 lg-washer-dryer-card.