ollo69 / ha-smartthinq-sensors

HomeAssistant custom integration for SmartThinQ LG devices configurable with Lovelace User Interface.
Apache License 2.0
1.03k stars 149 forks source link

Not getting a value back #722

Closed booti101 closed 1 month ago

booti101 commented 3 months ago

Sorry, i am not brilliant with the Home Assistant coding, so tend to modify what's already there to give me what I need. In this instance i have copied a Mushroom Card from the main page here and I am trying to add a value to show the countdown timer on my washing machine.

The original code is

type: custom:mushroom-template-card
primary: Dryer
secondary: >-
  {% if is_state("sensor.dryer", "on") %}

  Running {{ state_attr("sensor.dryer", "current_course") }}

  Currently {{ state_attr("sensor.dryer", "run_state") }}

  {{ state_attr("sensor.dryer", "initial_time") }} total, {{ state_attr("sensor.dryer", "remain_time") }} to go

  {% else %}

  Off

  {% endif %}
icon: mdi:tumble-dryer
entity: sensor.dryer
multiline_secondary: true
icon_color: '{{ "indigo" if is_state("sensor.dryer", "on") else "" }}'
tap_action:
  action: more-info

which i have updated for my device to be

type: custom:mushroom-template-card
primary: Washing Machine
secondary: >-
  {% if is_state("sensor.washer", "on") %}

  Running {{ state_attr("sensor.washer", "current_course") }}

  Spin Speed {{ state_attr("sensor.washer", "spin_speed") }}

  Water Temp {{ state_attr("sensor.washer", "water_temp") }}

  Currently {{ state_attr("sensor.washer", "run_state") }}

  {{ state_attr("sensor.washer", "countdown_time") }} till cycle starts

  {{ state_attr("sensor.washer", "initial_time") }} total, with {{
  state_attr("sensor.washer", "remain_time") }} left to go 

  {% else %}

  Off

  {% endif %}
icon: mdi:washing-machine
entity: sensor.washer
multiline_secondary: true
icon_color: '{{ "green" if is_state("sensor.washer", "on") else "" }}'
tap_action:
  action: more-info
fill_container: false

However the countdown_time constantly returns a NONE value in the card, even though if i look at the entity or run an entity card, it shows the correct value.

I am doing something wrong in the coding no doubt, but i cant see what

Could anyone offer any assistance please?

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 month ago

This issue was closed because it has been stalled for 7 days with no activity.