Toogle script blueprint status

Hi,

I use the toggle script blueprint (Toggle Scene on/off script) to make an script that turns on and of more lights. Now i try to change the icons in thedashboard when togling but it seems not to work :frowning:

type: custom:mushroom-template-card
primary: I am home
secondary: ''
icon: mdi:home
entity: script.home_toggle_scene
icon_color: |
  {% if is_state(scene.iamhome, 'on') %}
  green
  {% else %}
  grey
  {% endif %}
layout: vertical

some sugestions?