Value_Template Icon Color

I have my template working but want to change the icon color when motion is detected. I have tried different examples that I found in the forum but none of them are working. How can I change the color when motion is detected?

- platform: template
  sensors:
    living_room_motion:
      friendly_name: "Living Room Motion"
      value_template: >-
        {% if is_state('binary_sensor.living_room_motion_44662', 'off') %}
          {% elif is_state('binary_sensor.living_room_motion_44662', 'on') %}
            Detected
          {% else %}
            failed
          {% endif %}
      icon_template: >-
        {% if is_state('binary_sensor.living_room_motion_44662', 'off') %}
            mdi:walk
          {% elif is_state('binary_sensor.living_room_motion_44662', 'on') %}
            mdi:run
          {% endif %}

I figured out another way. Instead of using a new sensor I found another post that showed me how to update the customize.yaml file.

binary_sensor.living_room_motion_44662:
    icon: mdi:walk
    sensor_class: opening
    device_class: motion