It has to be a sensor, not a binary_sensor. A binary_sensor will always be on or off. A sensor can have about any value want.
Just move your template to the sensor configuration (and I know, the sensor designation under the binary_sensor is a bit confusing… - it’s the same thing under the sensor configuration…). You can also eliminate the entity_id line, as HA knows to monitor that for changes because it’s in the template.
Thanks a lot for putting me into the right direction. Moved to sensor directory and deleted the entity_id. I over concentrated on binary_sensor for reasons of ability to change state of icon color. Managed to accomplish the same under sensor configuration by using the following lovelace configuration. All working as intended now. Again, thanks for your help.