def _create_ha_name(name, channel, param, count):
 if ((count == 1) and (param is None)):
  return name
 if ((count > 1) and (param is None)):
  return '{} {}'.format(name, channel)
 if ((count == 1) and (param is not None)):
  return '{} {}'.format(name, param)
 if ((count > 1) and (param is not None)):
  return '{} {} {}'.format(name, channel, param)

def _create_ha_name ( name , channel , param , count ) : if ( ( count == 1 ) and ( param is None ) ) : return name if ( ( count > 1 ) and ( param is None ) ) : return '{} {}' . format ( name , channel ) if ( ( count == 1 ) and ( param is not None ) ) : return '{} {}' . format ( name , param ) if ( ( count > 1 ) and ( param is not None ) ) : return '{} {} {}' . format ( name , channel , param )
generate a unique object name .