phrz / lg-washer-dryer-card

Lovelace cards for use with the Home Assistant LG ThinQ Integration
MIT License
298 stars 56 forks source link

Sensor Missing #13

Closed charbottle closed 2 years ago

charbottle commented 2 years ago

I think there might be an error within the washer-card.yaml & dryer-card.yaml. On line 46 of the dryer card it calls for entity "sensor.dryer_time_display" but there is none. I switched mine to "sensor.dryer_remaining_time" and it works, but there is an yellow explanation mark in a triangle behind the time, don't know if one thing has to do with the other.

I see in the configuration.yaml, there appears to be entities setup for them, but they don't show under Integrations, LGE Devices, Entities, Here is my configuration.yaml

`- platform: template sensors: washer_door_lock: friendly_name: "Washer Door Lock" value_template: "{{ state_attr('sensor.front_load_washer','door_lock') }}"

washer_time_display:
  friendly_name: "Washer Time Display"
  value_template: >
    {% if is_state('sensor.front_load_washer_run_state', '-') %}
    {% elif is_state('sensor.front_load_washer_run_state', 'Standby') %}
      -:--
    {% else %}
      {{ as_timestamp(strptime(state_attr('sensor.front_load_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.dryer_run_state', '-') %}
      {% elif is_state('sensor.dryer_run_state', 'Standby') %}
        -:--
      {% else %}
        {{ as_timestamp(strptime(state_attr('sensor.dryer', 'remain_time'), '%H:%M:%S')) | timestamp_custom('%-H:%M') }}
      {% endif %}

      blank:
  friendly_name: "Blank Sensor"
  value_template: ""`
raliseda commented 2 years ago

I have the same issue, when I change display time to remaining time, it works but since the timer uses seconds, the display wont fit. Have you manage to resolve this? thanks

charbottle commented 2 years ago

Sorry, found the issue. The instructions stated to change the washer to whatever LG named them, which in my case was front_load_washer. So when I went thru the configuration.yaml, I renamed them all. But it appears I did not need to rename both door_lock & remain_time. Here is my updated configuration.yaml

sensor:
- platform: template
  sensors:
    washer_door_lock:
      friendly_name: "Washer Door Lock"
      value_template: "{{ state_attr('sensor.front_load_washer','door_lock') }}"

    washer_time_display:
      friendly_name: "Washer Time Display"
      value_template: >
        {% if is_state('sensor.front_load_washer_run_state', '-') %}
        {% elif is_state('sensor.front_load_washer_run_state', 'Standby') %}
          -:--
        {% else %}
          {{ as_timestamp(strptime(state_attr('sensor.front_load_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.dryer_run_state', '-') %}
          {% elif is_state('sensor.dryer_run_state', 'Standby') %}
            -:--
          {% else %}
            {{ as_timestamp(strptime(state_attr('sensor.dryer', 'remain_time'), '%H:%M:%S')) | timestamp_custom('%-H:%M') }}
          {% endif %}

    blank:
      friendly_name: "Blank Sensor"
      value_template: ""
charbottle commented 2 years ago

I fixed the seconds issue that was found in Issue #11 using their suggestion. But it's also shown in the above code.