[SOLVED] Group Count not working

Just starting to work with OpenHab and have not been able to get the group count to control the background color. Any thoughts?

      'background-color': {{(itemsInGroup(config.ITEM_ID) | filter:{type:'Switch', state:'1'}).length + (itemsInGroup(config.ITEM_ID) | filter:{type:'Dimmer', state:'!0'}:true).length}} =='0' ? config.OPEN_COLOR : config.CLOSED_COLOR
   <div class="template-contents">

  <div class="row">
    <div class="ng-binding">{{(config.ITEM_NAME)}}</div>
	<div class="row" >
    	<widget-icon iconset="(config.ICONSET)" icon="(config.ICON)"
     		size="(config.icon_size)" center="true"  />
		<div class="row">
 			<div class="">({{(itemsInGroup(config.ITEM_ID) | filter:{type:'Switch', state:'1'}).length + (itemsInGroup(config.ITEM_ID) | filter:{type:'Dimmer', state:'!0'}:true).length}})</div>

filter:{type:'Switch', state:'1'}

Not sure, but I think the Switch items’ states here would be ‘ON’ rather than ‘1’.

I had been testing with only dimmers. You are correct it needs to be ‘ON’.
The group counting displays correctly in the bottom row.
But using the same syntax for the background-color doesn’t trigger any changes.
I have done this same thing looking at an items value and it works fine.
Im sure this is a syntax deal just not sure what it might be at this point.

Ah, right. You don’t need any {{ }} to evaluate the expression because the whole ng-style is already an expression.

ng-style="{ 'background-color': (itemsInGroup(config.ITEM_ID) | filter:{type:'Switch', state:'1'}).length + (itemsInGroup(config.ITEM_ID) | filter:{type:'Dimmer', state:'!0'}:true).length =='0' ? config.OPEN_COLOR : config.CLOSED_COLOR }"

Awesome! That was it thanks a bunch.