Custom widgets unable send commands in habpanel?

I am trying to do creating a custom widgets is done in habpanel. when click on widget on the unable to see action performance like light_ON or light_OFF and also log files.
How to configure custom widgets in habpanel. please help me i am currently working on this.
Thanks & Regards,

Here is my custom template that does send command off on click. In order to switch off a group of lights. it can send any command.
I still see that there is no visual feedback on the state change. But that is a bug that is worked on.

  <div style="background: rgba(0,0,0,0.5);
            margin-top: 3px;
            margin-left: 3px;
            border-radius: 10px;
            border: 1px;
            border-style: solid;
            border-color: rgb(100,100,100) ;
            width:236px; height: 236px;
	<div class="row" style="height: 30px;border: 0px;border-style: solid" ></div>
	<div class="row" style= " text-align: center;" >    
      <button class="test" 
              style= "border: none; background: rgba(0,0,0,0); outline:none; " 
              ng-click="sendCmd('gLights_B', 'OFF')"> 
	    <widget-icon iconset="'smarthome-set'" icon="'power-button'" size="100" state="itemValue('gLights_B')" />
	<div class="row" style="
  				  font-size: 2em;
  				  font-family: Roboto, Helvetica, sans-serif;
                  text-align: center;
                  border: 0px;      
  				  border-style: solid;
                  border-color: green;            
  				  margin-top: 30px;
                  margin-left: 0px;
                  margin-right: 0px         
                        ">Basement OFF

How to configure custom widgets in habpanel.
I am trying to do configure custom widgets in habpanel. In habpanel widget creation is done,it will show on the habpanel dashboard. Once click on the widget it is not responding,means unable to send commands like ON and OFF.I am also test with your widget this also not able to send commands.Is there any configurations while using custom widget?
This is my widget code

Here i am unable to see commands like switch ON and switch OFF.Please help me i am trying to creating new widgets.
Thanks and Regards,