Mushroom first steps with template

I have created a couple of helpers

input_text.next_refuse
input_datetime.next_refuse_date

I want to display this information in a card on my dashboard. I thought I would try to use the mushroom template card.

I want to display something like

Next Refuse : Non-Recyclable
Collection: Fri 2nd February

This is my input starting with the example template card:

type: custom:mushroom-template-card
primary: {{ states('input_text._refuse') }}
secondary: How are you {{states('input_datetime.refuse_date')}}
icon: mdi:dump-truck
entity_id: input_text.refuse

When I hit save the contents get corrupted:

type: custom:mushroom-template-card
primary:
  '[object Object]': null
secondary: How are you {{states('input_datetime.refuse_date')}}
icon: mdi:dump-truck
entity_id: input_text.refuse

with this error message:

Visual editor is not supported for this configuration:
At path: primary -- Expected a string, but received: [object Object]
You can still edit your config in YAML.

I tried to find the documentation and ended up at https://github.com/piitaya/lovelace-mushroom/blob/d1905fd945110820db32459c4fa2ae7009fb0776/docs/cards/template.md but that is much too terse for a beginner.

Hi @stevegroom

Try putting quite around your templates:

type: custom:mushroom-template-card
primary: "{{ states('input_text._refuse') }}"
secondary: "How are you {{states('input_datetime.refuse_date')}}"
icon: mdi:dump-truck
entity_id: input_text.refuse

Thank you - making progress now. But where do I find docs on mushroom templates and these functions such as states(…?

See Templating

Templating isn’t just for mushroom cards. It is used all across Home Assistant.

Aha !!

Thank you! I read the first paragraph of the Templating docs a few times and did not think that was describing the same sort of templating:

Templating is a powerful feature that allows you to control information going into and out of the system. It is used for:

That paragraph mentions several areas where I have not (yet) done much more than the basics.

Cheers!