Widget-icon states set manualy?

I was mindlessly using the widget icon this way for a long time with state taken from the switch value.

<widget-icon iconset="'smarthome-set'" icon="'recycling'" size="100" state="itemValue('B_office_corridor')" />

But now I need to make a 3-way switch with on-off-Motion options. Will do that with ng-if.
How can I in a template set the state to OFF (gray) or ON ( colorized or both Motion and ON)
state=“OFF” or state=‘OFF’ is not working , what the syntax here?

TIA

Maybe
state="(itemState('...') == 'OFF') ? 'OFF' : 'ON'"
but I’m not sure I understood right.