Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting a value back #722

Closed
booti101 opened this issue Mar 21, 2024 · 2 comments
Closed

Not getting a value back #722

booti101 opened this issue Mar 21, 2024 · 2 comments
Labels

Comments

@booti101
Copy link

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?

Copy link

github-actions bot commented May 6, 2024

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 github-actions bot added the Stale label May 6, 2024
Copy link

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

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant